Skip to content

Commit 4204c98

Browse files
committed
Tensor operator *(NDArray x, Tensor y)
1 parent d44f044 commit 4204c98

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ You may obtain a copy of the License at
1414
limitations under the License.
1515
******************************************************************************/
1616

17+
using NumSharp;
1718
using System;
1819
using System.Linq;
1920
using static Tensorflow.Binding;
@@ -63,6 +64,8 @@ public partial class Tensor
6364
public static Tensor operator *(uint constant, Tensor tensor) => BinaryOpWrapper("mul", constant, tensor);
6465
public static Tensor operator *(long constant, Tensor tensor) => BinaryOpWrapper("mul", constant, tensor);
6566
public static Tensor operator *(ulong constant, Tensor tensor) => BinaryOpWrapper("mul", constant, tensor);
67+
public static Tensor operator *(NDArray x, Tensor y) => BinaryOpWrapper("mul", x, y);
68+
public static Tensor operator *(Tensor x, NDArray y) => BinaryOpWrapper("mul", x, y);
6669

6770
private static readonly TF_DataType[] _intTfDataTypes = {
6871
TF_DataType.TF_INT8, TF_DataType.TF_INT16, TF_DataType.TF_INT32, TF_DataType.TF_INT64,

0 commit comments

Comments
 (0)