@@ -730,12 +730,7 @@ public static (Tensor sampled_candidates, Tensor true_expected_count, Tensor sam
730730 /// </remarks>
731731 public static Tensor angle(Tensor input, TF_DataType? Tout = null, string name = "Angle")
732732 {
733- var dict = new Dictionary<string, object>();
734- dict["input"] = input;
735- if (Tout.HasValue)
736- dict["Tout"] = Tout.Value;
737- var op = tf.OpDefLib._apply_op_helper("Angle", name: name, keywords: dict);
738- return op.output;
733+ return tf.Context.ExecuteOp("Angle", name, new ExecuteOpArgs(input).SetAttributes(new { Tout = Tout }));
739734 }
740735
741736 /// <summary>
@@ -4976,15 +4971,14 @@ public static Tensor compare_and_bitpack(Tensor input, Tensor threshold, string
49764971 /// tf.complex(real, imag) ==&gt; [[2.25 + 4.75j], [3.25 + 5.75j]]
49774972 /// </code>
49784973 /// </remarks>
4979- public static Tensor complex(Tensor real, Tensor imag, TF_DataType? Tout = null, string name = "Complex")
4974+ public static Tensor complex(Tensor real, Tensor imag, TF_DataType? a_Tout = null, string name = "Complex")
49804975 {
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+ TF_DataType Tin = real.GetDataType();
4977+ if (a_Tout is null)
4978+ {
4979+ a_Tout = (Tin == TF_DataType.TF_DOUBLE)? TF_DataType.TF_COMPLEX128: TF_DataType.TF_COMPLEX64;
4980+ }
4981+ return tf.Context.ExecuteOp("Complex", name, new ExecuteOpArgs(real, imag).SetAttributes(new { T=Tin, Tout=a_Tout }));
49884982 }
49894983
49904984 /// <summary>
@@ -5008,12 +5002,7 @@ public static Tensor complex(Tensor real, Tensor imag, TF_DataType? Tout = null,
50085002 /// </remarks>
50095003 public static Tensor complex_abs(Tensor x, TF_DataType? Tout = null, string name = "ComplexAbs")
50105004 {
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;
5005+ return tf.Context.ExecuteOp("ComplexAbs", name, new ExecuteOpArgs(x).SetAttributes(new { Tout = Tout }));
50175006 }
50185007
50195008 /// <summary>
@@ -5313,10 +5302,7 @@ public static Tensor configure_distributed_t_p_u(string embedding_config = null,
53135302 /// </remarks>
53145303 public static Tensor conj(Tensor input, string name = "Conj")
53155304 {
5316- var dict = new Dictionary<string, object>();
5317- dict["input"] = input;
5318- var op = tf.OpDefLib._apply_op_helper("Conj", name: name, keywords: dict);
5319- return op.output;
5305+ return tf.Context.ExecuteOp("Conj", name, new ExecuteOpArgs(new object[] { input }));
53205306 }
53215307
53225308 /// <summary>
@@ -10489,10 +10475,7 @@ public static Tensor extract_jpeg_shape(Tensor contents, TF_DataType? output_typ
1048910475 /// </remarks>
1049010476 public static Tensor f_f_t(Tensor input, string name = "FFT")
1049110477 {
10492- var dict = new Dictionary<string, object>();
10493- dict["input"] = input;
10494- var op = tf.OpDefLib._apply_op_helper("FFT", name: name, keywords: dict);
10495- return op.output;
10478+ return tf.Context.ExecuteOp("FFT", name, new ExecuteOpArgs(input));
1049610479 }
1049710480
1049810481 /// <summary>
@@ -10519,10 +10502,7 @@ public static Tensor f_f_t(Tensor input, string name = "FFT")
1051910502 /// </remarks>
1052010503 public static Tensor f_f_t2d(Tensor input, string name = "FFT2D")
1052110504 {
10522- var dict = new Dictionary<string, object>();
10523- dict["input"] = input;
10524- var op = tf.OpDefLib._apply_op_helper("FFT2D", name: name, keywords: dict);
10525- return op.output;
10505+ return tf.Context.ExecuteOp("FFT2D", name, new ExecuteOpArgs(input));
1052610506 }
1052710507
1052810508 /// <summary>
@@ -10549,10 +10529,7 @@ public static Tensor f_f_t2d(Tensor input, string name = "FFT2D")
1054910529 /// </remarks>
1055010530 public static Tensor f_f_t3d(Tensor input, string name = "FFT3D")
1055110531 {
10552- var dict = new Dictionary<string, object>();
10553- dict["input"] = input;
10554- var op = tf.OpDefLib._apply_op_helper("FFT3D", name: name, keywords: dict);
10555- return op.output;
10532+ return tf.Context.ExecuteOp("FFT3D", name, new ExecuteOpArgs(input));
1055610533 }
1055710534
1055810535 /// <summary>
@@ -12875,10 +12852,7 @@ public static Tensor host_const(Tensor value, TF_DataType dtype, string name = "
1287512852 /// </remarks>
1287612853 public static Tensor i_f_f_t(Tensor input, string name = "IFFT")
1287712854 {
12878- var dict = new Dictionary<string, object>();
12879- dict["input"] = input;
12880- var op = tf.OpDefLib._apply_op_helper("IFFT", name: name, keywords: dict);
12881- return op.output;
12855+ return tf.Context.ExecuteOp("IFFT", name, new ExecuteOpArgs(input));
1288212856 }
1288312857
1288412858 /// <summary>
@@ -12905,10 +12879,7 @@ public static Tensor i_f_f_t(Tensor input, string name = "IFFT")
1290512879 /// </remarks>
1290612880 public static Tensor i_f_f_t2d(Tensor input, string name = "IFFT2D")
1290712881 {
12908- var dict = new Dictionary<string, object>();
12909- dict["input"] = input;
12910- var op = tf.OpDefLib._apply_op_helper("IFFT2D", name: name, keywords: dict);
12911- return op.output;
12882+ return tf.Context.ExecuteOp("IFFT2D", name, new ExecuteOpArgs(input));
1291212883 }
1291312884
1291412885 /// <summary>
@@ -12935,10 +12906,7 @@ public static Tensor i_f_f_t2d(Tensor input, string name = "IFFT2D")
1293512906 /// </remarks>
1293612907 public static Tensor i_f_f_t3d(Tensor input, string name = "IFFT3D")
1293712908 {
12938- var dict = new Dictionary<string, object>();
12939- dict["input"] = input;
12940- var op = tf.OpDefLib._apply_op_helper("IFFT3D", name: name, keywords: dict);
12941- return op.output;
12909+ return tf.Context.ExecuteOp("IFFT3D", name, new ExecuteOpArgs(input));
1294212910 }
1294312911
1294412912 /// <summary>
@@ -13325,14 +13293,12 @@ public static Tensor igammac(Tensor a, Tensor x, string name = "Igammac")
1332513293 /// tf.imag(input) ==&gt; [4.75, 5.75]
1332613294 /// </code>
1332713295 /// </remarks>
13328- public static Tensor imag(Tensor input, TF_DataType? Tout = null, string name = "Imag")
13296+ public static Tensor imag(Tensor input, TF_DataType? a_Tout = null, string name = "Imag")
1332913297 {
13330- var dict = new Dictionary<string, object>();
13331- dict["input"] = input;
13332- if (Tout.HasValue)
13333- dict["Tout"] = Tout.Value;
13334- var op = tf.OpDefLib._apply_op_helper("Imag", name: name, keywords: dict);
13335- return op.output;
13298+ TF_DataType Tin = input.GetDataType();
13299+ return tf.Context.ExecuteOp("Imag", name, new ExecuteOpArgs(input).SetAttributes(new { T = Tin, Tout = a_Tout }));
13300+
13301+ // return tf.Context.ExecuteOp("Imag", name, new ExecuteOpArgs(new object[] { input }));
1333613302 }
1333713303
1333813304 /// <summary>
@@ -23863,14 +23829,12 @@ public static Tensor reader_serialize_state_v2(Tensor reader_handle, string name
2386323829 /// tf.real(input) ==&gt; [-2.25, 3.25]
2386423830 /// </code>
2386523831 /// </remarks>
23866- public static Tensor real(Tensor input, TF_DataType? Tout = null, string name = "Real")
23832+ public static Tensor real(Tensor input, TF_DataType? a_Tout = null, string name = "Real")
2386723833 {
23868- var dict = new Dictionary<string, object>();
23869- dict["input"] = input;
23870- if (Tout.HasValue)
23871- dict["Tout"] = Tout.Value;
23872- var op = tf.OpDefLib._apply_op_helper("Real", name: name, keywords: dict);
23873- return op.output;
23834+ TF_DataType Tin = input.GetDataType();
23835+ return tf.Context.ExecuteOp("Real", name, new ExecuteOpArgs(input).SetAttributes(new { T = Tin, Tout = a_Tout }));
23836+
23837+ // return tf.Context.ExecuteOp("Real", name, new ExecuteOpArgs(new object[] {input}));
2387423838 }
2387523839
2387623840 /// <summary>
0 commit comments