diff --git a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs index 5d585e77..051f4f6b 100644 --- a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs @@ -374,6 +374,16 @@ namespace Tensorflow public static Tensor sign(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];