TensorFlow 2.0 Beta is available Learn more

tf.distribute.in_cross_replica_context

Returns True if in a cross-replica context.

Aliases:

  • tf.compat.v1.distribute.in_cross_replica_context
  • tf.compat.v2.distribute.in_cross_replica_context
  • tf.contrib.distribute.in_cross_replica_context
  • tf.distribute.in_cross_replica_context
tf.distribute.in_cross_replica_context()

Defined in python/distribute/distribution_strategy_context.py.

See tf.distribute.get_replica_context for details.

Returns:

True if in a cross-replica context (get_replica_context() returns None), or False if in a replica context (get_replica_context() returns non-None).