diff --git a/src/TensorFlowNET.Core/APIs/tf.math.cs b/src/TensorFlowNET.Core/APIs/tf.math.cs index a28ec9d3..6e093cb6 100644 --- a/src/TensorFlowNET.Core/APIs/tf.math.cs +++ b/src/TensorFlowNET.Core/APIs/tf.math.cs @@ -269,6 +269,16 @@ namespace Tensorflow public Tensor subtract(Tensor x, T[] y, string name = null) where T : struct => gen_math_ops.sub(x, ops.convert_to_tensor(y, dtype: x.dtype.as_base_dtype(), name: "y"), name); + /// + /// return x - y + /// + /// + /// + /// + /// + public Tensor subtract(Tensor x, Tensor y, string name = null) + => gen_math_ops.sub(x, y, name); + public Tensor log(Tensor x, string name = null) => gen_math_ops.log(x, name); @@ -335,8 +345,17 @@ namespace Tensorflow public Tensor minimum(T1 x, T2 y, string name = null) => gen_math_ops.minimum(x, y, name: name); - public Tensor multiply(Tx x, Ty y) - => gen_math_ops.mul(x, y); + /// + /// return x * y + /// + /// + /// + /// + /// + /// + /// + public Tensor multiply(Tx x, Ty y, string name = null) + => gen_math_ops.mul(x, y, name: name); public Tensor negative(Tensor x, string name = null) => gen_math_ops.neg(x, name); diff --git a/src/TensorFlowNET.Core/Sessions/_FetchHandler.cs b/src/TensorFlowNET.Core/Sessions/_FetchHandler.cs index 79692798..84cae247 100644 --- a/src/TensorFlowNET.Core/Sessions/_FetchHandler.cs +++ b/src/TensorFlowNET.Core/Sessions/_FetchHandler.cs @@ -80,6 +80,9 @@ namespace Tensorflow case NPTypeCode.Single: full_values.Add(float.NaN); break; + case NPTypeCode.Double: + full_values.Add(float.NaN); + break; case NPTypeCode.String: full_values.Add(float.NaN); break;