diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-08-21 18:22:15 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-21 18:25:59 -0700 |
commit | 708b30f4cb82271bb28cb70a1e0c89a1933f5b64 (patch) | |
tree | 22470a9314f7f4225b6d08170a3d7ea91b0216a1 /tensorflow/contrib/training | |
parent | d0cac47a767dd972516f75ce57f0d6185e3b6514 (diff) |
Move from deprecated self.test_session() to self.session() when a graph is set.
self.test_session() has been deprecated in cl/208545396 as its behavior confuses readers of the test. Moving to self.session() instead.
PiperOrigin-RevId: 209696110
Diffstat (limited to 'tensorflow/contrib/training')
-rw-r--r-- | tensorflow/contrib/training/python/training/batch_sequences_with_states_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/contrib/training/python/training/batch_sequences_with_states_test.py b/tensorflow/contrib/training/python/training/batch_sequences_with_states_test.py index df07ff44ee..81278ea82c 100644 --- a/tensorflow/contrib/training/python/training/batch_sequences_with_states_test.py +++ b/tensorflow/contrib/training/python/training/batch_sequences_with_states_test.py @@ -508,7 +508,7 @@ class BatchSequencesWithStatesTest(test.TestCase): class PaddingTest(test.TestCase): def testPaddingInvalidLengths(self): - with ops.Graph().as_default() as g, self.test_session(graph=g): + with ops.Graph().as_default() as g, self.session(graph=g): sequences = { "key_1": constant_op.constant([1, 2, 3]), # length 3 "key_2": constant_op.constant([1.5, 2.5]) # length 2 @@ -520,7 +520,7 @@ class PaddingTest(test.TestCase): padded_seq["key_1"].eval() def testPadding(self): - with ops.Graph().as_default() as g, self.test_session(graph=g): + with ops.Graph().as_default() as g, self.session(graph=g): sequences = { "key_1": constant_op.constant([1, 2]), "key_2": constant_op.constant([0.5, -1.0]), @@ -549,7 +549,7 @@ class PaddingTest(test.TestCase): val2 = np.array([9, 12]) shape2 = np.array([5]) - with ops.Graph().as_default() as g, self.test_session(graph=g): + with ops.Graph().as_default() as g, self.session(graph=g): sp_tensor1 = sparse_tensor.SparseTensor( indices=array_ops.constant(ind1, dtypes.int64), values=array_ops.constant(val1, dtypes.int64), |