Watch talks from the 2019 TensorFlow Dev Summit Watch now

tf.distribute.in_cross_replica_context

Aliases:

  • tf.contrib.distribute.in_cross_replica_context
  • tf.distribute.in_cross_replica_context
tf.distribute.in_cross_replica_context()

Defined in tensorflow/python/distribute/distribution_strategy_context.py.

Returns True if in a cross-replica context.

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).