diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-09-13 00:05:23 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-13 00:09:08 -0700 |
commit | 626bc997c28e1dfeaa85041e6c5a057fec7e0a02 (patch) | |
tree | 288347a8327ed2d0e15cd295e01cef7398c7af89 /tensorflow/python/kernel_tests/reshape_op_test.py | |
parent | 845aaec5ec2191f2708247a09d9bad37f012f536 (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: 212766976
Diffstat (limited to 'tensorflow/python/kernel_tests/reshape_op_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/reshape_op_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/kernel_tests/reshape_op_test.py b/tensorflow/python/kernel_tests/reshape_op_test.py index ef9b439230..ca3ff1d1df 100644 --- a/tensorflow/python/kernel_tests/reshape_op_test.py +++ b/tensorflow/python/kernel_tests/reshape_op_test.py @@ -94,7 +94,7 @@ class ReshapeTest(test.TestCase): def testFloatReshapeGradThreeDimensions(self): x = np.arange(1., 25.).reshape([2, 3, 4]).astype(np.float32) s = list(np.shape(x)) - with self.test_session(): + with self.cached_session(): input_tensor = constant_op.constant(x) reshape_out = array_ops.reshape(input_tensor, [1, 8, 3]) err = gradient_checker.compute_gradient_error( |