@@ -140,19 +140,14 @@ public static Tensor asin(Tensor x, string name = null)
140140 return _op . outputs [ 0 ] ;
141141 }
142142
143- public static EagerTensor add ( Tensor x , Tensor y , string name = null )
143+ public static Tensor add < Tx , Ty > ( Tx x , Ty y , string name = null )
144144 {
145145 if ( tf . context . executing_eagerly ( ) )
146146 {
147- var _result = pywrap_tfe_src . TFE_Py_FastPathExecute ( tf . context , "" , "Add" , name , new [ ] { x , y } ) ;
147+ var _result = pywrap_tfe_src . TFE_Py_FastPathExecute ( tf . context , "" , "Add" , name , x , y ) ;
148148 return _result ;
149149 }
150150
151- return null ;
152- }
153-
154- public static Tensor add < Tx , Ty > ( Tx x , Ty y , string name = null )
155- {
156151 var _op = _op_def_lib . _apply_op_helper ( "Add" , name , args : new { x , y } ) ;
157152
158153 return _op . output ;
@@ -469,6 +464,12 @@ public static Tensor log(Tensor x, string name = null)
469464
470465 public static Tensor cast ( Tensor x , TF_DataType DstT , bool Truncate = false , string name = null )
471466 {
467+ if ( tf . context . executing_eagerly ( ) )
468+ {
469+ var _result = pywrap_tfe_src . TFE_Py_FastPathExecute ( tf . context , "" , "Cast" , name , x , "DstT" , DstT , "Truncate" , Truncate ) ;
470+ return _result ;
471+ }
472+
472473 var _op = _op_def_lib . _apply_op_helper ( "Cast" , name , args : new { x , DstT , Truncate } ) ;
473474
474475 return _op . outputs [ 0 ] ;
@@ -490,6 +491,12 @@ public static Tensor sqrt(Tensor x, string name = null)
490491
491492 public static Tensor sub < Tx , Ty > ( Tx x , Ty y , string name = null )
492493 {
494+ if ( tf . context . executing_eagerly ( ) )
495+ {
496+ var _result = pywrap_tfe_src . TFE_Py_FastPathExecute ( tf . context , "" , "Sub" , name , x , y ) ;
497+ return _result ;
498+ }
499+
493500 var _op = _op_def_lib . _apply_op_helper ( "Sub" , name , args : new { x , y } ) ;
494501
495502 return _op . outputs [ 0 ] ;
@@ -535,6 +542,12 @@ public static Tensor atan2(Tensor y, Tensor x, string name = null)
535542
536543 public static Tensor mul < Tx , Ty > ( Tx x , Ty y , string name = null )
537544 {
545+ if ( tf . context . executing_eagerly ( ) )
546+ {
547+ var _result = pywrap_tfe_src . TFE_Py_FastPathExecute ( tf . context , "" , "Mul" , name , x , y ) ;
548+ return _result ;
549+ }
550+
538551 var _op = _op_def_lib . _apply_op_helper ( "Mul" , name , args : new { x , y } ) ;
539552
540553 return _op . outputs [ 0 ] ;
@@ -549,6 +562,12 @@ public static Tensor mul_no_nan<Tx, Ty>(Tx x, Ty y, string name = null)
549562
550563 public static Tensor real_div ( Tensor x , Tensor y , string name = null )
551564 {
565+ if ( tf . context . executing_eagerly ( ) )
566+ {
567+ var _result = pywrap_tfe_src . TFE_Py_FastPathExecute ( tf . context , "" , "RealDiv" , name , x , y ) ;
568+ return _result ;
569+ }
570+
552571 var _op = _op_def_lib . _apply_op_helper ( "RealDiv" , name , args : new { x , y } ) ;
553572
554573 return _op . outputs [ 0 ] ;
@@ -570,6 +589,12 @@ public static Tensor floor_mod(Tensor x, Tensor y, string name = null)
570589
571590 public static Tensor floor_div ( Tensor x , Tensor y , string name = null )
572591 {
592+ if ( tf . context . executing_eagerly ( ) )
593+ {
594+ var _result = pywrap_tfe_src . TFE_Py_FastPathExecute ( tf . context , "" , "FloorDiv" , name , x , y ) ;
595+ return _result ;
596+ }
597+
573598 var _op = _op_def_lib . _apply_op_helper ( "FloorDiv" , name , args : new { x , y } ) ;
574599
575600 return _op . outputs [ 0 ] ;
0 commit comments