From 4204c985c828704c6728e8e24d6c08c8acbcc6b5 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sun, 1 Sep 2019 09:59:16 -0500 Subject: [PATCH] Tensor operator *(NDArray x, Tensor y) --- src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs b/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs index 4b15864f..b9308f18 100644 --- a/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs +++ b/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs @@ -14,6 +14,7 @@ limitations under the License. ******************************************************************************/ +using NumSharp; using System; using System.Linq; using static Tensorflow.Binding; @@ -63,6 +64,8 @@ namespace Tensorflow public static Tensor operator *(uint constant, Tensor tensor) => BinaryOpWrapper("mul", constant, tensor); public static Tensor operator *(long constant, Tensor tensor) => BinaryOpWrapper("mul", constant, tensor); public static Tensor operator *(ulong constant, Tensor tensor) => BinaryOpWrapper("mul", constant, tensor); + public static Tensor operator *(NDArray x, Tensor y) => BinaryOpWrapper("mul", x, y); + public static Tensor operator *(Tensor x, NDArray y) => BinaryOpWrapper("mul", x, y); private static readonly TF_DataType[] _intTfDataTypes = { TF_DataType.TF_INT8, TF_DataType.TF_INT16, TF_DataType.TF_INT32, TF_DataType.TF_INT64,