Skip to content

Commit 79b9a07

Browse files
committed
add tf.acos
1 parent c16d659 commit 79b9a07

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎src/TensorFlowNET.Core/APIs/tf.math.cs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ public static partial class tf
99
public static Tensor abs(Tensor x, string name = null)
1010
=> math_ops.abs(x, name);
1111

12+
/// <summary>
13+
/// Computes acos of x element-wise.
14+
/// </summary>
15+
/// <param name="x"></param>
16+
/// <param name="name"></param>
17+
/// <returns></returns>
18+
public static Tensor acos(Tensor x, string name = null)
19+
=> gen_math_ops.acos(x, name);
20+
1221
public static Tensor add(Tensor a, Tensor b)
1322
=> gen_math_ops.add(a, b);
1423

‎src/TensorFlowNET.Core/Operations/gen_math_ops.cs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ public static Tensor prod<T1, T2>(T1 input, T2 axis, bool keep_dims = false, str
5858
return _op.outputs[0];
5959
}
6060

61+
public static Tensor acos(Tensor x, string name = null)
62+
{
63+
var _op = _op_def_lib._apply_op_helper("Acos", name, args: new { x });
64+
65+
return _op.outputs[0];
66+
}
67+
6168
public static Tensor add(Tensor x, Tensor y, string name = null)
6269
{
6370
var _op = _op_def_lib._apply_op_helper("Add", name, args: new { x, y });

0 commit comments

Comments
 (0)