# tf.distribute.InputReplicationMode

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/distribute/distribute_lib.py#L816-L830) |

Replication mode for input function.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.distribute.InputReplicationMode`](https://www.tensorflow.org/api_docs/python/tf/distribute/InputReplicationMode)

<br />

- `PER_WORKER`: The input function will be called on each worker independently, creating as many input pipelines as number of workers. Replicas will dequeue from the local Dataset on their worker. [`tf.distribute.Strategy`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/distribute/Strategy) doesn't manage any state sharing between such separate input pipelines.
- `PER_REPLICA`: The input function will be called on each replica separately. [`tf.distribute.Strategy`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/distribute/Strategy) doesn't manage any state sharing between such separate input pipelines.

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| PER_REPLICA | `<InputReplicationMode.PER_REPLICA: 'PER_REPLICA'>` |
| PER_WORKER | `<InputReplicationMode.PER_WORKER: 'PER_WORKER'>` |

<br />