aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/control_flow_ops_py_test.py
diff options
context:
space:
mode:
authorGravatar Alexandre Passos <apassos@google.com>2018-02-05 14:47:23 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-05 14:51:48 -0800
commit3374d3a6e5b9f77fa4229c41b233f1c0a229216f (patch)
tree35449a6ad0b3d69810ee40aff32af6bc1be97668 /tensorflow/python/kernel_tests/control_flow_ops_py_test.py
parent1c762f70caf7004470cdfa599b4eb7a76e5bcc78 (diff)
Automated g4 rollback of changelist 184573795
PiperOrigin-RevId: 184590080
Diffstat (limited to 'tensorflow/python/kernel_tests/control_flow_ops_py_test.py')
-rw-r--r--tensorflow/python/kernel_tests/control_flow_ops_py_test.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/tensorflow/python/kernel_tests/control_flow_ops_py_test.py b/tensorflow/python/kernel_tests/control_flow_ops_py_test.py
index 15ff0ec09b..4fafc36014 100644
--- a/tensorflow/python/kernel_tests/control_flow_ops_py_test.py
+++ b/tensorflow/python/kernel_tests/control_flow_ops_py_test.py
@@ -704,36 +704,6 @@ class ControlFlowTest(test.TestCase):
r = control_flow_ops.while_loop(c, b, [n], parallel_iterations=20)
self.assertEqual(10000, r.eval())
- def testWhileExternalControlDependencies(self):
- with self.test_session():
- v = variables.Variable(0.0)
- v.initializer.run()
- increment = v.assign_add(1.0)
-
- def body_fn(i):
- with ops.control_dependencies([increment]):
- return i + i
-
- result = control_flow_ops.while_loop(cond=lambda i: i < 1,
- body=body_fn, loop_vars=[1])
- result.eval()
- self.assertAllEqual(v.eval(), 1.0)
-
- def testWhileExternalControlDependenciesNoInput(self):
- with self.test_session():
- v = variables.Variable(0.0)
- v.initializer.run()
- increment = v.assign_add(1.0)
-
- def body_fn(unused_i):
- with ops.control_dependencies([increment]):
- return constant_op.constant(5, name="five")
-
- result = control_flow_ops.while_loop(cond=lambda i: i < 5,
- body=body_fn, loop_vars=[0])
- result.eval()
- self.assertAllEqual(v.eval(), 1.0)
-
def testWhileWithRefs_1(self):
with self.test_session() as sess:
x = variables.Variable(0)._ref() # pylint: disable=protected-access