TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.compat.v1.train.limit_epochs

View source on GitHub

Returns tensor num_epochs times and then raises an OutOfRange error. (deprecated)

tf.compat.v1.train.limit_epochs(
    tensor,
    num_epochs=None,
    name=None
)

Args:

  • tensor: Any Tensor.
  • 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: if num_epochs is invalid.