@@ -714,7 +714,23 @@ public static Tensor log(Tensor x, string name = null)
714714
715715 return _op . outputs [ 0 ] ;
716716 }
717+ public static Tensor softplus ( Tensor features , string name = null )
718+ {
719+ if ( tf . Context . executing_eagerly ( ) )
720+ {
721+ var results = tf . Runner . TFE_FastPathExecute ( tf . Context , tf . Context . DeviceName ,
722+ "Softplus" , name ,
723+ null ,
724+ features ) ;
717725
726+ return results [ 0 ] ;
727+ }
728+
729+ var _op = tf . OpDefLib . _apply_op_helper ( "Softplus" , name , args : new { features } ) ;
730+
731+ return _op . outputs [ 0 ] ;
732+ }
733+
718734 public static Tensor cast ( Tensor x , TF_DataType DstT , bool Truncate = false , string name = null )
719735 => tf . Context . RunInAutoMode ( ( )
720736 => tf . OpDefLib . _apply_op_helper ( "Cast" , name , args : new { x , DstT , Truncate } ) . output , ( )
@@ -1068,6 +1084,15 @@ public static Tensor minimum<T1, T2>(T1 x, T2 y, string name = null)
10681084
10691085 public static Tensor _abs ( Tensor x , string name = null )
10701086 {
1087+ if ( tf . Context . executing_eagerly ( ) )
1088+ {
1089+ var results = tf . Runner . TFE_FastPathExecute ( tf . Context , tf . Context . DeviceName ,
1090+ "Abs" , name ,
1091+ null ,
1092+ x ) ;
1093+
1094+ return results [ 0 ] ;
1095+ }
10711096 var _op = tf . OpDefLib . _apply_op_helper ( "Abs" , name , args : new { x } ) ;
10721097
10731098 return _op . output ;
@@ -1202,6 +1227,15 @@ public static Tensor round(Tensor x, string name = "Round")
12021227 /// <returns></returns>
12031228 public static Tensor rsqrt ( Tensor x , string name = null )
12041229 {
1230+ if ( tf . Context . executing_eagerly ( ) )
1231+ {
1232+ var results = tf . Runner . TFE_FastPathExecute ( tf . Context , tf . Context . DeviceName ,
1233+ "Rsqrt" , name ,
1234+ null ,
1235+ x ) ;
1236+
1237+ return results [ 0 ] ;
1238+ }
12051239 var _op = tf . OpDefLib . _apply_op_helper ( "Rsqrt" , name , new { x } ) ;
12061240
12071241 return _op . outputs [ 0 ] ;
0 commit comments