@@ -291,7 +291,7 @@ value as EagerTensor
291291 /// <param name="s1">A `Tensor`. Must have the same type as `s0`.</param>
292292 /// <param name="name">A name for the operation (optional).</param>
293293 /// <returns>A tuple of `Tensor` objects (r0, r1).</returns>
294- public static ( Tensor , Tensor ) broadcast_gradient_args ( Tensor s0 , Tensor s1 , string name = "" )
294+ public unsafe static ( Tensor , Tensor ) broadcast_gradient_args ( Tensor s0 , Tensor s1 , string name = "" )
295295 {
296296 if ( tf . context . executing_eagerly ( ) )
297297 {
@@ -303,6 +303,7 @@ public static (Tensor, Tensor) broadcast_gradient_args(Tensor s0, Tensor s1, str
303303 s1 as EagerTensor
304304 } , 2 , null , status ) ;
305305 status . Check ( true ) ;
306+ return ( new EagerTensor ( * ( IntPtr * ) _result ) , new EagerTensor ( * ( ( IntPtr * ) _result + 1 ) ) ) ;
306307 }
307308
308309 var _op = _op_def_lib. _apply_op_helper( "BroadcastGradientArgs" , name , new { s0 , s1 } ) ;
@@ -318,6 +319,19 @@ public static Tensor reverse<T>(Tensor tensor, T axis, string name = null)
318319
319320 public static Tensor reshape < T1, T2> ( T1 tensor , T2 shape , string name = null )
320321 {
322+ if ( tf . context . executing_eagerly ( ) )
323+ {
324+ using var status = new Status ( ) ;
325+ EagerTensorHandle _result = c_api. TFE_FastPathExecute( tf . context , tf . context . device_name ,
326+ "Reshape" , name , new IntPtr [ ]
327+ {
328+ tensor as EagerTensor ,
329+ shape as EagerTensor
330+ } , 2 , null , status ) ;
331+ status . Check ( true ) ;
332+ return _result ;
333+ }
334+
321335 var _op = _op_def_lib. _apply_op_helper ( "Reshape" , name , new { tensor , shape } ) ;
322336 return _op. output ;
323337 }
@@ -455,6 +469,19 @@ public static Tensor[] split(Tensor axis, Tensor value, int num_split, string na
455469
456470 public static Tensor tile< T > ( Tensor input , T multiples , string name = null )
457471 {
472+ if ( tf . context . executing_eagerly ( ) )
473+ {
474+ using var status = new Status ( ) ;
475+ EagerTensorHandle tensor = c_api. TFE_FastPathExecute( tf . context , tf . context . device_name ,
476+ "Tile" , name , new IntPtr [ ]
477+ {
478+ input as EagerTensor ,
479+ multiples as EagerTensor
480+ } , 2 , null , status ) ;
481+ status . Check ( true ) ;
482+ return tensor ;
483+ }
484+
458485 var _op = _op_def_lib. _apply_op_helper ( "Tile" , name , new { input , multiples } ) ;
459486 return _op. outputs [ 0 ] ;
460487 }
0 commit comments