@@ -130,7 +130,7 @@ public Tensor add(Tensor a, Tensor b, string name = null)
130130 => gen_math_ops . add ( a , b , name : name ) ;
131131
132132 public Tensor add < Tx , Ty > ( Tx a , Ty b , string name = null )
133- => gen_math_ops . add ( a , b , name : name ) ;
133+ => gen_math_ops . add ( ops . convert_to_tensor ( a ) , ops . convert_to_tensor ( b ) , name : name ) ;
134134
135135 /// <summary>
136136 /// Adds all input tensors element-wise.
@@ -151,10 +151,10 @@ public Tensor atan(Tensor x, string name = null)
151151 => gen_math_ops . atan ( x , name ) ;
152152
153153 public Tensor arg_max ( Tensor input , int dimension , TF_DataType output_type = TF_DataType . TF_INT64 , string name = null )
154- => gen_math_ops . arg_max ( input , dimension , output_type : output_type , name : name ) ;
154+ => gen_math_ops . arg_max ( input , ops . convert_to_tensor ( dimension ) , output_type : output_type , name : name ) ;
155155
156156 public Tensor arg_min ( Tensor input , int dimension , TF_DataType output_type = TF_DataType . TF_INT64 , string name = null )
157- => gen_math_ops . arg_min ( input , dimension , output_type : output_type , name : name ) ;
157+ => gen_math_ops . arg_min ( input , ops . convert_to_tensor ( dimension ) , output_type : output_type , name : name ) ;
158158
159159 public Tensor is_finite ( Tensor input , string name = null )
160160 => gen_math_ops . is_finite ( input , name ) ;
@@ -199,7 +199,7 @@ public Tensor cos(Tensor x, string name = null)
199199 => gen_math_ops . cos ( x , name ) ;
200200
201201 public Tensor cos ( float x , string name = null )
202- => gen_math_ops . cos ( x , name ) ;
202+ => gen_math_ops . cos ( ops . convert_to_tensor ( x ) , name ) ;
203203
204204 /// <summary>
205205 /// Computes hyperbolic cosine of x element-wise.
@@ -235,7 +235,7 @@ public Tensor floor(Tensor x, string name = null)
235235 /// <param name="name"></param>
236236 /// <returns></returns>
237237 public Tensor greater < Tx , Ty > ( Tx x , Ty y , string name = null )
238- => gen_math_ops . greater ( x , y , name ) ;
238+ => gen_math_ops . greater ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name ) ;
239239
240240 /// <summary>
241241 /// Returns the truth value of (x >= y) element-wise.
@@ -247,7 +247,7 @@ public Tensor greater<Tx, Ty>(Tx x, Ty y, string name = null)
247247 /// <param name="name"></param>
248248 /// <returns></returns>
249249 public Tensor greater_equal < Tx , Ty > ( Tx x , Ty y , string name = null )
250- => gen_math_ops . greater_equal ( x , y , name ) ;
250+ => gen_math_ops . greater_equal ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name ) ;
251251
252252 /// <summary>
253253 /// Returns the truth value of (x < y) element-wise.
@@ -259,7 +259,7 @@ public Tensor greater_equal<Tx, Ty>(Tx x, Ty y, string name = null)
259259 /// <param name="name"></param>
260260 /// <returns></returns>
261261 public Tensor less < Tx , Ty > ( Tx x , Ty y , string name = null )
262- => gen_math_ops . less ( x , y , name ) ;
262+ => gen_math_ops . less ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name ) ;
263263
264264 /// <summary>
265265 /// Computes the log of the absolute value of `Gamma(x)` element-wise.
@@ -280,7 +280,7 @@ public Tensor lgamma(Tensor x, string name = null)
280280 /// <param name="name"></param>
281281 /// <returns></returns>
282282 public Tensor less_equal < Tx , Ty > ( Tx x , Ty y , string name = null )
283- => gen_math_ops . less_equal ( x , y , name ) ;
283+ => gen_math_ops . less_equal ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name ) ;
284284
285285 /// <summary>
286286 /// Computes natural logarithm of (1 + x) element-wise.
@@ -292,7 +292,7 @@ public Tensor log1p(Tensor x, string name = null)
292292 => gen_math_ops . log1p ( x , name ) ;
293293
294294 public Tensor logical_and < T > ( T x , T y , string name = null )
295- => gen_math_ops . logical_and ( x , y , name ) ;
295+ => gen_math_ops . logical_and ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name ) ;
296296
297297 public Tensor logical_not ( Tensor x , string name = null )
298298 => gen_math_ops . logical_not ( x , name ) ;
@@ -301,7 +301,10 @@ public Tensor logical_or(Tensor x, Tensor y, string name = null)
301301 => gen_math_ops . logical_or ( x , y , name ) ;
302302
303303 public Tensor logical_xor ( Tensor x , Tensor y , string name = "LogicalXor" )
304- => gen_math_ops . logical_xor ( x , y , name ) ;
304+ {
305+ return gen_math_ops . logical_and ( gen_math_ops . logical_or ( x , y ) ,
306+ gen_math_ops . logical_not ( gen_math_ops . logical_and ( x , y ) ) , name ) ;
307+ }
305308
306309 /// <summary>
307310 /// Clips tensor values to a specified min and max.
@@ -312,7 +315,7 @@ public Tensor logical_xor(Tensor x, Tensor y, string name = "LogicalXor")
312315 /// <param name="name"></param>
313316 /// <returns></returns>
314317 public Tensor _clip_by_value ( Tensor t , Tensor clip_value_min , Tensor clip_value_max , string name = null )
315- => gen_math_ops . _clip_by_value ( t , clip_value_min , clip_value_max ) ;
318+ => gen_math_ops . clip_by_value ( t , clip_value_min , clip_value_max ) ;
316319
317320 /// <summary>
318321 /// Clips tensor values to a specified min and max.
@@ -345,7 +348,7 @@ public Tensor clip_by_value<T1, T2>(Tensor t, T1 clip_value_min, T2 clip_value_m
345348 => clip_ops . clip_by_value ( t , clip_value_min , clip_value_max , name ) ;
346349
347350 public Tensor sub < Tx , Ty > ( Tx a , Ty b , string name = null )
348- => gen_math_ops . sub ( a , b , name : name ) ;
351+ => gen_math_ops . sub ( ops . convert_to_tensor ( a ) , ops . convert_to_tensor ( b ) , name : name ) ;
349352
350353 public Tensor divide ( Tensor a , Tensor b )
351354 => a / b ;
@@ -396,7 +399,7 @@ public Tensor atan2(Tensor y, Tensor x, string name = null)
396399 /// <param name="name"></param>
397400 /// <returns></returns>
398401 public Tensor max < Tx , Ty > ( Tx input , Ty axis , bool keep_dims = false , string name = null )
399- => gen_math_ops . _max ( input , axis , keep_dims : keep_dims , name : name ) ;
402+ => gen_math_ops . max ( ops . convert_to_tensor ( input ) , ops . convert_to_tensor ( axis ) , keep_dims : keep_dims , name : name ) ;
400403
401404 /// <summary>
402405 /// Computes the minimum of elements across dimensions of a tensor.
@@ -409,7 +412,7 @@ public Tensor max<Tx, Ty>(Tx input, Ty axis, bool keep_dims = false, string name
409412 /// <param name="name"></param>
410413 /// <returns></returns>
411414 public Tensor min < Tx , Ty > ( Tx input , Ty axis , bool keep_dims = false , string name = null )
412- => gen_math_ops . _min ( input , axis , keep_dims : keep_dims , name : name ) ;
415+ => gen_math_ops . min ( ops . convert_to_tensor ( input ) , ops . convert_to_tensor ( axis ) , keep_dims : keep_dims , name : name ) ;
413416
414417 /// <summary>
415418 /// Returns the max of x and y (i.e. x > y ? x : y) element-wise.
@@ -421,7 +424,7 @@ public Tensor min<Tx, Ty>(Tx input, Ty axis, bool keep_dims = false, string name
421424 /// <param name="name"></param>
422425 /// <returns></returns>
423426 public Tensor maximum < T1 , T2 > ( T1 x , T2 y , string name = null )
424- => gen_math_ops . maximum ( x , y , name : name ) ;
427+ => gen_math_ops . maximum ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name : name ) ;
425428
426429 /// <summary>
427430 /// Returns the min of x and y (i.e. x < y ? x : y) element-wise.
@@ -433,7 +436,7 @@ public Tensor maximum<T1, T2>(T1 x, T2 y, string name = null)
433436 /// <param name="name"></param>
434437 /// <returns></returns>
435438 public Tensor minimum < T1 , T2 > ( T1 x , T2 y , string name = null )
436- => gen_math_ops . minimum ( x , y , name : name ) ;
439+ => gen_math_ops . minimum ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name : name ) ;
437440
438441 public Tensor multiply ( Tensor x , Tensor y , string name = null )
439442 => gen_math_ops . mul ( x , y , name : name ) ;
@@ -448,7 +451,7 @@ public Tensor multiply(Tensor x, Tensor y, string name = null)
448451 /// <param name="name"></param>
449452 /// <returns></returns>
450453 public Tensor multiply < Tx , Ty > ( Tx x , Ty y , string name = null )
451- => gen_math_ops . mul ( x , y , name : name ) ;
454+ => gen_math_ops . mul ( ops . convert_to_tensor ( x ) , ops . convert_to_tensor ( y ) , name : name ) ;
452455
453456 public Tensor negative ( Tensor x , string name = null )
454457 => gen_math_ops . neg ( x , name ) ;
@@ -577,7 +580,7 @@ public Tensor sigmoid<T>(T x, string name = null)
577580 => math_ops . sigmoid ( x , name : name ) ;
578581
579582 public Tensor sum ( Tensor input , int axis , bool keep_dims = false , string name = null )
580- => gen_math_ops . _sum ( input , axis , keep_dims : keep_dims , name : name ) ;
583+ => gen_math_ops . sum ( input , ops . convert_to_tensor ( axis ) , keep_dims : keep_dims , name : name ) ;
581584
582585 public Tensor reduce_mean ( Tensor input_tensor , Axis ? axis = null , bool keepdims = false , string name = null , int ? reduction_indices = null )
583586 => math_ops . reduce_mean ( input_tensor , axis : axis , keepdims : keepdims , name : name , reduction_indices : reduction_indices ) ;
0 commit comments