[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.train.limit_epochs\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/input.py#L81-L114) |\n\nReturns tensor `num_epochs` times and then raises an `OutOfRange` error. (deprecated)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.train.limit_epochs`](/api_docs/python/tf/compat/v1/train/limit_epochs)\n\n\u003cbr /\u003e\n\n tf.train.limit_epochs(\n tensor, num_epochs=None, name=None\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Queue-based input pipelines have been replaced by [`tf.data`](../../tf/data). Use `tf.data.Dataset.from_tensors(tensor).repeat(num_epochs)`.\n| **Note:** creates local counter `epochs`. Use `local_variables_initializer()` to initialize local variables.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------------|-------------------------------------------------------------------------------------------------------------|\n| `tensor` | Any `Tensor`. |\n| `num_epochs` | A positive integer (optional). If specified, limits the number of steps the output tensor may be evaluated. |\n| `name` | A name for the operations (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| tensor or `OutOfRange`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-----------------------------|\n| `ValueError` | if `num_epochs` is invalid. |\n\n\u003cbr /\u003e"]]