You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static Tensor complex(Tensor real, Tensor imag, TF_DataType? Tout = null, string name = "Complex")
4980
4975
{
4981
-
var dict = new Dictionary<string, object>();
4982
-
dict["real"] = real;
4983
-
dict["imag"] = imag;
4984
-
if (Tout.HasValue)
4985
-
dict["Tout"] = Tout.Value;
4986
-
var op = tf.OpDefLib._apply_op_helper("Complex", name: name, keywords: dict);
4987
-
return op.output;
4976
+
return tf.Context.ExecuteOp("Complex", name, new ExecuteOpArgs(new object[] { real, imag })); // sorry, cannot pass Tout, so it only works with complex64. complex128 is not supported yet
4988
4977
}
4989
4978
4979
+
4980
+
4990
4981
/// <summary>
4991
4982
/// Computes the complex absolute value of a tensor.
4992
4983
/// </summary>
@@ -5008,12 +4999,7 @@ public static Tensor complex(Tensor real, Tensor imag, TF_DataType? Tout = null,
5008
4999
/// </remarks>
5009
5000
public static Tensor complex_abs(Tensor x, TF_DataType? Tout = null, string name = "ComplexAbs")
5010
5001
{
5011
-
var dict = new Dictionary<string, object>();
5012
-
dict["x"] = x;
5013
-
if (Tout.HasValue)
5014
-
dict["Tout"] = Tout.Value;
5015
-
var op = tf.OpDefLib._apply_op_helper("ComplexAbs", name: name, keywords: dict);
5016
-
return op.output;
5002
+
return tf.Context.ExecuteOp("ComplexAbs", name, new ExecuteOpArgs(new object[] { x }));
0 commit comments