aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/recurrent
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-10 14:36:26 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-10 14:49:41 -0700
commit890e16594a005fe703a5556530b0dc3e6527fa47 (patch)
tree99140efb13f392ae13a58f08c08754c61bf66f13 /tensorflow/contrib/recurrent
parent132babebf5b1026cb33cad7c4eb7e03810c2acdf (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/recurrent')
-rw-r--r--tensorflow/contrib/recurrent/python/kernel_tests/recurrent_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/recurrent/python/kernel_tests/recurrent_test.py b/tensorflow/contrib/recurrent/python/kernel_tests/recurrent_test.py
index 00fbd4fbb8..aea80a5256 100644
--- a/tensorflow/contrib/recurrent/python/kernel_tests/recurrent_test.py
+++ b/tensorflow/contrib/recurrent/python/kernel_tests/recurrent_test.py
@@ -56,7 +56,7 @@ class RecurrentTest(test_util.TensorFlowTestCase):
x_power=state.x_power * theta.x)
return next_state, []
- with self.test_session() as sess:
+ with self.cached_session() as sess:
theta = _PolyTheta(x=array_ops.constant(2.0))
state = _PolyState(
value=array_ops.constant(0.0),
@@ -142,7 +142,7 @@ class RecurrentTest(test_util.TensorFlowTestCase):
def _ParameterizedTestElman(self, seqlen, use_grad):
- with self.test_session() as sess:
+ with self.cached_session() as sess:
random_seed.set_random_seed(342462)
batch = 3