diff options
author | 2015-12-17 16:38:45 -0800 | |
---|---|---|
committer | 2015-12-17 16:38:45 -0800 | |
commit | 9c23536c2ead0bb2e8d9904a4260fe0bf188bbb5 (patch) | |
tree | b37d3b418a6b2789c7cb0e4180a2f195ebf9f82c | |
parent | cfd24278cedc31d3bf5b965523a9f59c2fffc661 (diff) |
Number of epochs should not be trainable.
Change: 110493186
-rw-r--r-- | tensorflow/python/training/input.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/training/input.py b/tensorflow/python/training/input.py index 53bca00756..d02fa354aa 100644 --- a/tensorflow/python/training/input.py +++ b/tensorflow/python/training/input.py @@ -73,7 +73,7 @@ def limit_epochs(tensor, num_epochs=None, name=None): raise ValueError("num_epochs must be > 0 not %d." % num_epochs) with ops.op_scope([tensor], name, "limit_epochs") as name: zero64 = constant_op.constant(0, dtype=dtypes.int64) - epochs = variables.Variable(zero64, name="epochs") + epochs = variables.Variable(zero64, name="epochs", trainable=False) counter = epochs.count_up_to(num_epochs) with ops.control_dependencies([counter]): return array_ops.identity(tensor, name=name) |