tf.train.limit_epochs
tf.train.limit_epochs
tf.train.limit_epochs
limit_epochs( tensor, num_epochs=None, name=None )
Defined in tensorflow/python/training/input.py
.
See the guide: Inputs and Readers > Input pipeline
Returns tensor num_epochs
times and then raises an OutOfRange
error.
Note: creates local counterepochs
. Uselocal_variables_initializer()
to initialize local variables.
Args:
-
tensor
: AnyTensor
. -
num_epochs
: A positive integer (optional). If specified, limits the number of steps the output tensor may be evaluated. -
name
: A name for the operations (optional).
Returns:
tensor or OutOfRange
.
Raises:
-
ValueError
: ifnum_epochs
is invalid.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/train/limit_epochs