TensorFlow 2.0 Beta is available Learn more

tf.distribute.has_strategy

Return if there is a current non-default tf.distribute.Strategy.

Aliases:

  • tf.compat.v1.distribute.has_strategy
  • tf.compat.v2.distribute.has_strategy
  • tf.contrib.distribute.has_distribution_strategy
  • tf.contrib.distribute.has_strategy
  • tf.distribute.has_strategy
tf.distribute.has_strategy()
View source on GitHub

Returns:

True if inside a with strategy.scope():.