diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-08-22 15:06:15 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-22 15:15:31 -0700 |
commit | cd199a89dbffdd55aa2fc89acb874763382f196d (patch) | |
tree | 831b17c85b5c7c8257cc05bbc7d8940db8be0b32 /tensorflow/compiler/tests/matrix_band_part_test.py | |
parent | d44030304e4c0a50a3169ea06b528bd780780acb (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: 209837298
Diffstat (limited to 'tensorflow/compiler/tests/matrix_band_part_test.py')
-rw-r--r-- | tensorflow/compiler/tests/matrix_band_part_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/tests/matrix_band_part_test.py b/tensorflow/compiler/tests/matrix_band_part_test.py index 0d9f99f8a6..9222db4b7e 100644 --- a/tensorflow/compiler/tests/matrix_band_part_test.py +++ b/tensorflow/compiler/tests/matrix_band_part_test.py @@ -29,7 +29,7 @@ from tensorflow.python.platform import test class MatrixBandPartTest(xla_test.XLATestCase): def _testMatrixBandPart(self, dtype, shape): - with self.test_session(): + with self.cached_session(): batch_shape = shape[:-2] mat = np.ones(shape).astype(dtype) batch_mat = np.tile(mat, batch_shape + [1, 1]) |