@@ -161,18 +161,10 @@ private static Tensor prod_eager_fallback(Tensor input_t, int[] axis, bool keep_
161
161
}
162
162
163
163
public static Tensor acos ( Tensor x , string name = null )
164
- {
165
- var _op = tf . OpDefLib . _apply_op_helper ( "Acos" , name , args : new { x } ) ;
166
-
167
- return _op . outputs [ 0 ] ;
168
- }
164
+ => tf . Context . ExecuteOp ( "Acos" , name , new ExecuteOpArgs ( x ) ) ;
169
165
170
166
public static Tensor asin ( Tensor x , string name = null )
171
- {
172
- var _op = tf . OpDefLib . _apply_op_helper ( "Asin" , name , args : new { x } ) ;
173
-
174
- return _op . outputs [ 0 ] ;
175
- }
167
+ => tf . Context . ExecuteOp ( "Asin" , name , new ExecuteOpArgs ( x ) ) ;
176
168
177
169
public static Tensor add ( Tensor x , Tensor y , string name = null )
178
170
=> tf . Context . ExecuteOp ( "Add" , name , new ExecuteOpArgs ( x , y ) ) ;
@@ -233,21 +225,13 @@ public static Tensor sign<T>(T x, string name = "Sign")
233
225
=> tf . Context . ExecuteOp ( "Sign" , name , new ExecuteOpArgs ( x ) ) ;
234
226
235
227
public static Tensor sinh ( Tensor x , string name = null )
236
- {
237
- var _op = tf . OpDefLib . _apply_op_helper ( "Sinh" , name , args : new { x } ) ;
238
-
239
- return _op . outputs [ 0 ] ;
240
- }
228
+ => tf . Context . ExecuteOp ( "Sinh" , name , new ExecuteOpArgs ( x ) ) ;
241
229
242
230
public static Tensor cos < T > ( T x , string name = null )
243
231
=> tf . Context . ExecuteOp ( "Cos" , name , new ExecuteOpArgs ( x ) ) ;
244
232
245
233
public static Tensor cosh ( Tensor x , string name = null )
246
- {
247
- var _op = tf . OpDefLib . _apply_op_helper ( "Cosh" , name , args : new { x } ) ;
248
-
249
- return _op . outputs [ 0 ] ;
250
- }
234
+ => tf . Context . ExecuteOp ( "Cosh" , name , new ExecuteOpArgs ( x ) ) ;
251
235
252
236
/// <summary>
253
237
/// Computes the sum along segments of a tensor.
@@ -308,11 +292,8 @@ public static Tensor greater<Tx, Ty>(Tx x, Ty y, string name = null)
308
292
/// The Operation can be fetched from the resulting Tensor, by fetching the Operation property from the result.
309
293
/// </returns>
310
294
public static Tensor lgamma ( Tensor x , string name = null )
311
- {
312
- var op = tf . OpDefLib . _apply_op_helper ( "Lgamma" , name : name , args : new { x } ) ;
295
+ => tf . Context . ExecuteOp ( "Lgamma" , name , new ExecuteOpArgs ( x ) ) ;
313
296
314
- return op . output ;
315
- }
316
297
317
298
public static Tensor greater_equal < Tx , Ty > ( Tx x , Ty y , string name = null )
318
299
=> tf . Context . ExecuteOp ( "GreaterEqual" , name , new ExecuteOpArgs ( x , y ) ) ;
@@ -365,18 +346,11 @@ public static Tensor square(Tensor x, string name = null)
365
346
/// <param name="name"> A name for the operation (optional).</param>
366
347
/// <returns> A `Tensor` of type `bool`.</returns>
367
348
public static Tensor is_finite ( Tensor x , string name = null )
368
- {
369
- var _op = tf . OpDefLib . _apply_op_helper ( "IsFinite" , name , args : new { x } ) ;
370
-
371
- return _op . outputs [ 0 ] ;
372
- }
349
+ => tf . Context . ExecuteOp ( "IsFinite" , name , new ExecuteOpArgs ( x ) ) ;
373
350
374
351
public static Tensor is_nan ( Tensor x , string name = null )
375
- {
376
- var _op = tf . OpDefLib . _apply_op_helper ( "IsNan" , name : name , args : new { x } ) ;
352
+ => tf . Context . ExecuteOp ( "IsNan" , name , new ExecuteOpArgs ( x ) ) ;
377
353
378
- return _op . outputs [ 0 ] ;
379
- }
380
354
381
355
/// <summary>
382
356
/// Computes exponential of x element-wise. \\(y = e^x\\).
@@ -577,11 +551,7 @@ public static Tensor range(Tensor start, Tensor limit, Tensor delta, string name
577
551
/// according to the current system rounding mode use std::cint.
578
552
/// </remarks>
579
553
public static Tensor round ( Tensor x , string name = "Round" )
580
- {
581
- var op = tf . OpDefLib . _apply_op_helper ( "Round" , name : name , new { x } ) ;
582
-
583
- return op . output ;
584
- }
554
+ => tf . Context . ExecuteOp ( "Round" , name , new ExecuteOpArgs ( x ) ) ;
585
555
586
556
/// <summary>
587
557
/// Computes reciprocal of square root of x element-wise.
0 commit comments