Browse Source

Update Numpy.Math.cs

pull/1091/head
RayWang GitHub 2 years ago
parent
commit
ed33b7329b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/TensorFlowNET.Core/NumPy/Numpy.Math.cs

+ 10
- 1
src/TensorFlowNET.Core/NumPy/Numpy.Math.cs View File

@@ -28,7 +28,16 @@ namespace Tensorflow.NumPy
public static NDArray multiply(NDArray x1, NDArray x2) => new NDArray(tf.multiply(x1, x2)); public static NDArray multiply(NDArray x1, NDArray x2) => new NDArray(tf.multiply(x1, x2));


[AutoNumPy] [AutoNumPy]
public static NDArray maximum(NDArray x1, NDArray x2) => new NDArray(tf.maximum(x1, x2));
//public static NDArray maximum(NDArray x1, NDArray x2) => new NDArray(tf.maximum(x1, x2));
public static NDArray maximum(NDArray x1, NDArray x2, int? axis = null)
{
var maxValues = tf.maximum(x1, x2);
if (axis.HasValue)
{
maxValues = tf.reduce_max(maxValues, axis: axis.Value);
}
return new NDArray(maxValues);
}


[AutoNumPy] [AutoNumPy]
public static NDArray minimum(NDArray x1, NDArray x2) => new NDArray(tf.minimum(x1, x2)); public static NDArray minimum(NDArray x1, NDArray x2) => new NDArray(tf.minimum(x1, x2));


Loading…
Cancel
Save