aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/distribute
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-21 00:07:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-21 00:13:08 -0700
commitb19d6657070bbf1df5706195a0bf3a92cbf371fc (patch)
tree64279a06acd61c7028226eba46a05dd1127acee4 /tensorflow/contrib/distribute
parent2952f5134905af795ba90ae1eb97e39091ba9843 (diff)
Move from deprecated self.test_session() to self.cached_session().
self.test_session() has been deprecated in 9962eb5e84b15e309410071b06c2ed2d6148ed44 as its name confuses readers of the test. Moving to cached_session() instead which is more explicit about: * the fact that the session may be reused. * the session is not closed even when doing a "with self.test_session()" statement. PiperOrigin-RevId: 213944932
Diffstat (limited to 'tensorflow/contrib/distribute')
-rw-r--r--tensorflow/contrib/distribute/python/cross_tower_ops_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/distribute/python/cross_tower_ops_test.py b/tensorflow/contrib/distribute/python/cross_tower_ops_test.py
index 490371477a..a3e1b96a68 100644
--- a/tensorflow/contrib/distribute/python/cross_tower_ops_test.py
+++ b/tensorflow/contrib/distribute/python/cross_tower_ops_test.py
@@ -114,7 +114,7 @@ class CrossTowerOpsTestBase(test.TestCase, parameterized.TestCase):
self.assertEqual([v.numpy() for v in left._index.values()],
list(right._index.values()))
else:
- with self.test_session() as sess:
+ with self.cached_session() as sess:
self.assertEqual(
sess.run(list(left._index.values())), list(right._index.values()))