diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-09-10 14:36:26 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-10 14:49:41 -0700 |
commit | 890e16594a005fe703a5556530b0dc3e6527fa47 (patch) | |
tree | 99140efb13f392ae13a58f08c08754c61bf66f13 /tensorflow/contrib/model_pruning | |
parent | 132babebf5b1026cb33cad7c4eb7e03810c2acdf (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: 212336321
Diffstat (limited to 'tensorflow/contrib/model_pruning')
-rw-r--r-- | tensorflow/contrib/model_pruning/python/layers/rnn_cells_test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/model_pruning/python/layers/rnn_cells_test.py b/tensorflow/contrib/model_pruning/python/layers/rnn_cells_test.py index e85ae7b22a..586c6c7bfc 100644 --- a/tensorflow/contrib/model_pruning/python/layers/rnn_cells_test.py +++ b/tensorflow/contrib/model_pruning/python/layers/rnn_cells_test.py @@ -37,7 +37,7 @@ class RnnCellsTest(test.TestCase): expected_num_masks = 1 expected_num_rows = 2 * self.dim expected_num_cols = 4 * self.dim - with self.test_session(): + with self.cached_session(): inputs = variables.Variable( random_ops.random_normal([self.batch_size, self.dim])) c = variables.Variable( @@ -61,7 +61,7 @@ class RnnCellsTest(test.TestCase): expected_num_masks = 1 expected_num_rows = 2 * self.dim expected_num_cols = 4 * self.dim - with self.test_session(): + with self.cached_session(): inputs = variables.Variable( random_ops.random_normal([self.batch_size, self.dim])) c = variables.Variable( |