diff options
author | 2015-11-11 18:45:21 -0800 | |
---|---|---|
committer | 2015-11-11 18:45:21 -0800 | |
commit | f2102f4e2c1c87f1d1bf9ab856a2849c54478760 (patch) | |
tree | 54ffdbb4081d6e75d4e626682ea9c70e6866599b /tensorflow/python/training/learning_rate_decay_test.py | |
parent | 3961abed9560cd852fff4add393b451483bbc3af (diff) |
TensorFlow: upstream changes from the afternoon.
Changes:
- futurize --stage2 changes for Python 3 compatibility by @girving.
- Small updates to documentation by @vrv, schuster and others
- Account for failure of std::thread::hardware_concurrency by @ebrevdo.
- More changes for backwards-compatibility tests by Josh
- Updates to python op doc generation by Josh
- Added support for using the best-fit allocator via ConfigProto by @vrv.
- Rename LocalSession to DirectSession, since local was a bad name for
it.
- Enable tf.nn.moments() to work with tensors of unknown shape by @mrry.
GITHUB_ISSUE: 139
- Changes for Android build by Andrew.
Base CL: 107645181
Diffstat (limited to 'tensorflow/python/training/learning_rate_decay_test.py')
-rw-r--r-- | tensorflow/python/training/learning_rate_decay_test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow/python/training/learning_rate_decay_test.py b/tensorflow/python/training/learning_rate_decay_test.py index b85d58cae7..bc103591c2 100644 --- a/tensorflow/python/training/learning_rate_decay_test.py +++ b/tensorflow/python/training/learning_rate_decay_test.py @@ -1,4 +1,8 @@ """Functional test for learning rate decay.""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function + import tensorflow.python.platform from tensorflow.python.framework import test_util @@ -33,7 +37,7 @@ class LRDecayTest(test_util.TensorFlowTestCase): self.assertAllClose(decayed_lr.eval(), .1, 1e-6) # Decayed learning rate assign_100.op.run() - expected = .1 * 0.96 ** (100 / 3) + expected = .1 * 0.96**(100 // 3) self.assertAllClose(decayed_lr.eval(), expected, 1e-6) def testVariables(self): @@ -52,7 +56,7 @@ class LRDecayTest(test_util.TensorFlowTestCase): self.assertAllClose(decayed_lr.eval(), .1, 1e-6) # Decayed learning rate assign_100.op.run() - expected = .1 * 0.96 ** (100 / 3) + expected = .1 * 0.96**(100 // 3) self.assertAllClose(decayed_lr.eval(), expected, 1e-6) |