Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.distribute.in_cross_replica_context

TensorFlow 2.0 version View source on GitHub

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

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