Browse Source

add tf.atan2

tags/v0.9
Oceania2018 6 years ago
parent
commit
301a4271aa
2 changed files with 17 additions and 0 deletions
  1. +10
    -0
      src/TensorFlowNET.Core/APIs/tf.math.cs
  2. +7
    -0
      src/TensorFlowNET.Core/Operations/gen_math_ops.cs

+ 10
- 0
src/TensorFlowNET.Core/APIs/tf.math.cs View File

@@ -60,6 +60,16 @@ namespace Tensorflow
public static Tensor equal(Tensor x, Tensor y, string name = null)
=> gen_math_ops.equal(x, y, name);

/// <summary>
/// Computes arctangent of `y/x` element-wise, respecting signs of the arguments.
/// </summary>
/// <param name="y"></param>
/// <param name="x"></param>
/// <param name="name"></param>
/// <returns></returns>
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);



+ 7
- 0
src/TensorFlowNET.Core/Operations/gen_math_ops.cs View File

@@ -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 });


Loading…
Cancel
Save