@@ -8,22 +8,19 @@ namespace Tensorflow.Eager
88{
99 public class EagerOperation : Operation
1010 {
11- static Dictionary < string , OpDef > op_dict ;
1211 public string Name { get ; set ; }
1312 public new int NumInputs ;
1413 public IntPtr [ ] InputHandles { get ; set ; }
1514 public Tensor [ ] Inputs { get ; set ; }
1615 public new int NumOutputs ;
1716 public IntPtr [ ] OutputHandles { get ; set ; }
1817 public Tensor [ ] Outputs { get ; set ; }
19- public BindingArray SkipInputIndicesArray { get ; set ; }
20- public unsafe int [ ] SkipInputIndices => SkipInputIndicesArray . Data . Select ( x => * ( int * ) x ) . ToArray ( ) ;
21- public string [ ] AttrsArray { get ; set ; }
18+ public long [ ] SkipInputIndices { get ; set ; }
19+ public object [ ] Attrs { get ; set ; }
2220
2321 public EagerOperation ( ) : base ( IntPtr . Zero )
2422 {
25- if ( op_dict == null )
26- op_dict = op_def_registry . get_registered_ops ( ) ;
23+
2724 }
2825
2926 public override InputList inputs
@@ -72,9 +69,9 @@ public override object get_attr(string attr_name)
7269
7370 public bool get_attr_bool ( string attr_name )
7471 {
75- for ( int i = 0 ; i < AttrsArray . Length ; i = i + 2 )
76- if ( AttrsArray [ i ] == attr_name )
77- return AttrsArray [ i + 1 ] == "1" ;
72+ for ( int i = 0 ; i < Attrs . Length ; i = i + 2 )
73+ if ( Attrs [ i ] . Equals ( attr_name ) )
74+ return Attrs [ i + 1 ] . Equals ( "1" ) ;
7875
7976 throw new ValueError ( $ "Can't find attr: { attr_name } ") ;
8077 }
0 commit comments