# tf.contrib.distribute.require_replica_context

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/distribute/distribute_lib.py#L227-L239) |

Verify in `replica_ctx` replica context.

    tf.contrib.distribute.require_replica_context(
        replica_ctx
    )