Browse Source

Merge branch 'master' of https://github.com/SciSharp/TensorFlow.NET

tags/v0.40-tf2.4-tstring
Oceania2018 4 years ago
parent
commit
9d21faca65
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      src/TensorFlowNET.Core/Operations/gen_math_ops.cs

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

@@ -374,6 +374,16 @@ namespace Tensorflow

public static Tensor sign<T>(T x, string name = "Sign")
{
if (tf.executing_eagerly())
{
var results = tf.Runner.TFE_FastPathExecute(tf.Context, tf.Context.DeviceName,
"Sign", name,
null,
x);

return results[0];
}

var op = tf.OpDefLib._apply_op_helper("Sign", name: name, args: new { x });

return op.outputs[0];


Loading…
Cancel
Save