@@ -277,7 +277,7 @@ public void TestComplex()
277277 AssertItemsEqual ( new [ ] { a_4 . op } , e_4 . op . control_inputs ) ;
278278 }
279279
280- [ Ignore ( "will fail due to unsupported op 'FloatOutput' " ) ]
280+ [ Ignore ( "Don't know how to create an operation with two outputs " ) ]
281281 [ TestMethod ]
282282 public void TestRepeatedDependency ( )
283283 {
@@ -293,16 +293,22 @@ with g.control_dependencies([a_1]):
293293
294294 self.assertEqual(b.op.control_inputs, [a])
295295 self.assertEqual(c.op.control_inputs, [a])
296-
297- def testNoControlDependencyWithDataDependency(self):
298- g = ops.Graph()
299- a = _apply_op(g, "FloatOutput", [], [dtypes.float32])
300- with g.control_dependencies([a]):
301- b = _apply_op(g, "Identity", [a], [dtypes.float32])
302-
303- self.assertEqual(b.op.control_inputs, [])
296+
304297 */
305298 }
306299
300+ [ TestMethod ]
301+ public void TestNoControlDependencyWithDataDependency ( )
302+ {
303+ var g = tf . Graph ( ) . as_default ( ) ;
304+ Operation b = null ;
305+ var a = constant_op . constant ( 100.0 ) ;
306+ with ( g . control_dependencies ( new [ ] { a } ) , ctrl1 =>
307+ {
308+ b = array_ops . identity ( a ) ;
309+ } ) ;
310+ Assert . AreEqual ( 0 , b . op . control_inputs . Length ) ;
311+ }
312+
307313 }
308314}
0 commit comments