diff options
Diffstat (limited to 'tensorflow/python/training')
-rw-r--r-- | tensorflow/python/training/ftrl_test.py | 4 | ||||
-rw-r--r-- | tensorflow/python/training/learning_rate_decay_v2_test.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/training/ftrl_test.py b/tensorflow/python/training/ftrl_test.py index 09d6fe36d3..15c50bc878 100644 --- a/tensorflow/python/training/ftrl_test.py +++ b/tensorflow/python/training/ftrl_test.py @@ -218,7 +218,7 @@ class FtrlOptimizerTest(test.TestCase): def testFtrlWithL1_L2_L2ShrinkageSparse(self): """Tests the new FTRL op with support for l2 shrinkage on sparse grads.""" for dtype in [dtypes.half, dtypes.float32]: - with self.test_session() as sess: + with self.cached_session() as sess: var0 = variables.Variable([[1.0], [2.0]], dtype=dtype) var1 = variables.Variable([[4.0], [3.0]], dtype=dtype) grads0 = ops.IndexedSlices( @@ -252,7 +252,7 @@ class FtrlOptimizerTest(test.TestCase): def testFtrlWithL2ShrinkageDoesNotChangeLrSchedule(self): """Verifies that l2 shrinkage in FTRL does not change lr schedule.""" for dtype in [dtypes.half, dtypes.float32]: - with self.test_session() as sess: + with self.cached_session() as sess: var0 = variables.Variable([1.0, 2.0], dtype=dtype) var1 = variables.Variable([1.0, 2.0], dtype=dtype) grads0 = constant_op.constant([0.1, 0.2], dtype=dtype) diff --git a/tensorflow/python/training/learning_rate_decay_v2_test.py b/tensorflow/python/training/learning_rate_decay_v2_test.py index 0f2d60dafc..b2ac93f06f 100644 --- a/tensorflow/python/training/learning_rate_decay_v2_test.py +++ b/tensorflow/python/training/learning_rate_decay_v2_test.py @@ -62,7 +62,7 @@ class LRDecayTestV2(test_util.TensorFlowTestCase): self.assertAllClose(self.evaluate(decayed_lr()), expected, 1e-6) def testVariables(self): - with self.test_session(): + with self.cached_session(): step = variables.Variable(1) assign_1 = step.assign(1) assign_2 = step.assign(2) |