diff options
author | 2018-09-10 14:36:35 -0700 | |
---|---|---|
committer | 2018-09-10 14:53:04 -0700 | |
commit | f1cc58bb4144de61a693076d8ff8a26b2644ebbb (patch) | |
tree | a8c68e517f1819cc84d06981d69fb6162f670987 /tensorflow/python/training/warm_starting_util_test.py | |
parent | 890e16594a005fe703a5556530b0dc3e6527fa47 (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: 212336352
Diffstat (limited to 'tensorflow/python/training/warm_starting_util_test.py')
-rw-r--r-- | tensorflow/python/training/warm_starting_util_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/training/warm_starting_util_test.py b/tensorflow/python/training/warm_starting_util_test.py index 3ee0f6aaa2..6c860cd452 100644 --- a/tensorflow/python/training/warm_starting_util_test.py +++ b/tensorflow/python/training/warm_starting_util_test.py @@ -1133,7 +1133,7 @@ class WarmStartingUtilTest(test.TestCase): # Unused variable names raises ValueError. with ops.Graph().as_default(): - with self.test_session() as sess: + with self.cached_session() as sess: x = variable_scope.get_variable( "x", shape=[4, 1], |