@@ -130,7 +130,7 @@ public void Graph()
130130 EXPECT_EQ ( TF_Code . TF_OK , s . Code ) ;
131131
132132 // Serialize to NodeDef.
133- var node_def = c_test_util . GetNodeDef ( neg ) ;
133+ var node_def = neg . GetNodeDef ( ) ;
134134
135135 // Validate NodeDef is what we expect.
136136 ASSERT_TRUE ( c_test_util . IsNeg ( node_def , "add" ) ) ;
@@ -145,13 +145,13 @@ public void Graph()
145145 // Look up some nodes by name.
146146 Operation neg2 = c_api . TF_GraphOperationByName ( graph , "neg" ) ;
147147 EXPECT_EQ ( neg , neg2 ) ;
148- var node_def2 = c_test_util . GetNodeDef ( neg2 ) ;
148+ var node_def2 = neg2 . GetNodeDef ( ) ;
149149 EXPECT_EQ ( node_def . ToString ( ) , node_def2 . ToString ( ) ) ;
150150
151151 Operation feed2 = c_api . TF_GraphOperationByName ( graph , "feed" ) ;
152152 EXPECT_EQ ( feed , feed2 ) ;
153- node_def = c_test_util . GetNodeDef ( feed ) ;
154- node_def2 = c_test_util . GetNodeDef ( feed2 ) ;
153+ node_def = feed . GetNodeDef ( ) ;
154+ node_def2 = feed2 . GetNodeDef ( ) ;
155155 EXPECT_EQ ( node_def . ToString ( ) , node_def2 . ToString ( ) ) ;
156156
157157 // Test iterating through the nodes of a graph.
@@ -162,7 +162,7 @@ public void Graph()
162162 uint pos = 0 ;
163163 Operation oper ;
164164
165- while ( ( oper = c_api . TF_GraphNextOperation ( graph , ref pos ) ) != IntPtr . Zero )
165+ while ( ( oper = c_api . TF_GraphNextOperation ( graph , ref pos ) ) != IntPtr . Zero )
166166 {
167167 if ( oper . Equals ( feed ) )
168168 {
@@ -186,7 +186,7 @@ public void Graph()
186186 }
187187 else
188188 {
189- node_def = c_test_util . GetNodeDef ( oper ) ;
189+ node_def = oper . GetNodeDef ( ) ;
190190 Assert . Fail ( $ "Unexpected Node: { node_def . ToString ( ) } ") ;
191191 }
192192 }
@@ -256,7 +256,7 @@ public void ImportGraphDef()
256256 EXPECT_EQ ( 0 , neg . GetControlInputs ( ) . Length ) ;
257257 EXPECT_EQ ( 0 , neg . NumControlOutputs ) ;
258258 EXPECT_EQ ( 0 , neg . GetControlOutputs ( ) . Length ) ;
259-
259+
260260 // Import it again, with an input mapping, return outputs, and a return
261261 // operation, into the same graph.
262262 c_api . TF_DeleteImportGraphDefOptions ( opts ) ;
@@ -270,7 +270,7 @@ public void ImportGraphDef()
270270 EXPECT_EQ ( 1 , c_api . TF_ImportGraphDefOptionsNumReturnOperations ( opts ) ) ;
271271 var results = c_api . TF_GraphImportGraphDefWithResults ( graph , graph_def , opts , s ) ;
272272 EXPECT_EQ ( TF_Code . TF_OK , s . Code ) ;
273-
273+
274274 Operation scalar2 = graph . OperationByName ( "imported2/scalar" ) ;
275275 Operation feed2 = graph . OperationByName ( "imported2/feed" ) ;
276276 Operation neg2 = graph . OperationByName ( "imported2/neg" ) ;
@@ -287,7 +287,7 @@ public void ImportGraphDef()
287287 EXPECT_EQ ( 0 , return_outputs [ 0 ] . index ) ;
288288 EXPECT_EQ ( scalar , return_outputs [ 1 ] . oper ) ; // remapped
289289 EXPECT_EQ ( 0 , return_outputs [ 1 ] . index ) ;
290-
290+
291291 // Check return operation
292292 var return_opers = graph . ReturnOperations ( results ) ;
293293 ASSERT_EQ ( 1 , return_opers . Length ) ;
@@ -302,26 +302,26 @@ public void ImportGraphDef()
302302 c_api . TF_ImportGraphDefOptionsAddControlDependency ( opts , feed2 ) ;
303303 c_api . TF_GraphImportGraphDef ( graph , graph_def , opts , s ) ;
304304 EXPECT_EQ ( TF_Code . TF_OK , s . Code ) ;
305-
305+
306306 var scalar3 = graph . OperationByName ( "imported3/scalar" ) ;
307307 var feed3 = graph . OperationByName ( "imported3/feed" ) ;
308308 var neg3 = graph . OperationByName ( "imported3/neg" ) ;
309309 ASSERT_TRUE ( scalar3 != IntPtr . Zero ) ;
310310 ASSERT_TRUE ( feed3 != IntPtr . Zero ) ;
311311 ASSERT_TRUE ( neg3 != IntPtr . Zero ) ;
312-
312+
313313 // Check that newly-imported scalar and feed have control deps (neg3 will
314314 // inherit them from input)
315315 var control_inputs = scalar3 . GetControlInputs ( ) ;
316316 ASSERT_EQ ( 2 , scalar3 . NumControlInputs ) ;
317317 EXPECT_EQ ( feed , control_inputs [ 0 ] ) ;
318318 EXPECT_EQ ( feed2 , control_inputs [ 1 ] ) ;
319-
319+
320320 control_inputs = feed3 . GetControlInputs ( ) ;
321321 ASSERT_EQ ( 2 , feed3 . NumControlInputs ) ;
322322 EXPECT_EQ ( feed , control_inputs [ 0 ] ) ;
323323 EXPECT_EQ ( feed2 , control_inputs [ 1 ] ) ;
324-
324+
325325 // Export to a graph def so we can import a graph with control dependencies
326326 graph_def . Dispose ( ) ;
327327 graph_def = new Buffer ( ) ;
0 commit comments