From 79b9a075477b2dbe91030b61b7afc5d6d2305306 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Wed, 27 Mar 2019 01:54:30 -0500 Subject: [PATCH] add tf.acos --- src/TensorFlowNET.Core/APIs/tf.math.cs | 9 +++++++++ src/TensorFlowNET.Core/Operations/gen_math_ops.cs | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/src/TensorFlowNET.Core/APIs/tf.math.cs b/src/TensorFlowNET.Core/APIs/tf.math.cs index 3eba6032..7405b53c 100644 --- a/src/TensorFlowNET.Core/APIs/tf.math.cs +++ b/src/TensorFlowNET.Core/APIs/tf.math.cs @@ -9,6 +9,15 @@ namespace Tensorflow public static Tensor abs(Tensor x, string name = null) => math_ops.abs(x, name); + /// + /// Computes acos of x element-wise. + /// + /// + /// + /// + public static Tensor acos(Tensor x, string name = null) + => gen_math_ops.acos(x, name); + public static Tensor add(Tensor a, Tensor b) => gen_math_ops.add(a, b); diff --git a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs index 5a4efd32..e7af8631 100644 --- a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs @@ -58,6 +58,13 @@ namespace Tensorflow return _op.outputs[0]; } + public static Tensor acos(Tensor x, string name = null) + { + var _op = _op_def_lib._apply_op_helper("Acos", name, args: new { x }); + + return _op.outputs[0]; + } + public static Tensor add(Tensor x, Tensor y, string name = null) { var _op = _op_def_lib._apply_op_helper("Add", name, args: new { x, y });