aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/training/learning_rate_decay_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/training/learning_rate_decay_test.py')
-rw-r--r--tensorflow/python/training/learning_rate_decay_test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/python/training/learning_rate_decay_test.py b/tensorflow/python/training/learning_rate_decay_test.py
index 8232882822..177a2356e4 100644
--- a/tensorflow/python/training/learning_rate_decay_test.py
+++ b/tensorflow/python/training/learning_rate_decay_test.py
@@ -113,6 +113,11 @@ class LRDecayTest(test_util.TensorFlowTestCase):
with self.assertRaises(ValueError):
learning_rate_decay.piecewise_constant(x, boundaries, values)
+ # Test that ref types are valid.
+ x_ref = x.op.outputs[0] # float32_ref tensor should be accepted
+ boundaries, values = [1.0, 2.0], [1, 2, 3]
+ learning_rate_decay.piecewise_constant(x_ref, boundaries, values)
+
class LinearDecayTest(test_util.TensorFlowTestCase):