diff --git a/src/TensorFlowNET.Core/APIs/tf.math.cs b/src/TensorFlowNET.Core/APIs/tf.math.cs index ca047fdd..bb665082 100644 --- a/src/TensorFlowNET.Core/APIs/tf.math.cs +++ b/src/TensorFlowNET.Core/APIs/tf.math.cs @@ -60,6 +60,16 @@ namespace Tensorflow public static Tensor equal(Tensor x, Tensor y, string name = null) => gen_math_ops.equal(x, y, name); + /// + /// Computes arctangent of `y/x` element-wise, respecting signs of the arguments. + /// + /// + /// + /// + /// + public static Tensor atan2(Tensor y, Tensor x, string name = null) + => gen_math_ops.atan2(y, x, name); + public static Tensor multiply(Tensor x, Tensor y) => gen_math_ops.mul(x, y); diff --git a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs index 03cbee13..f5fbb772 100644 --- a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs @@ -187,6 +187,13 @@ namespace Tensorflow return _op.outputs[0]; } + public static Tensor atan2(Tensor y, Tensor x, string name = null) + { + var _op = _op_def_lib._apply_op_helper("Atan2", name, args: new { y, x }); + + return _op.outputs[0]; + } + public static Tensor mul(Tensor x, Tensor y, string name = null) { var _op = _op_def_lib._apply_op_helper("Mul", name, args: new { x, y });