TensorFlow 2.0 Beta is available Learn more

tf.contrib.distribute.require_replica_context

Verify in replica_ctx replica context.

tf.contrib.distribute.require_replica_context(replica_ctx)

Defined in python/distribute/distribute_lib.py.