W3cubDocs

/TensorFlow Python

tf.contrib.distribute.get_distribution_strategy

tf.contrib.distribute.get_distribution_strategy()

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

Returns the current DistributionStrategy object.

Prefer to use get_tower_context() or get_cross_tower_context() instead when possible.

Returns:

A DistributionStrategy object. Inside a with distribution_strategy.scope() block, it returns distribution_strategy, otherwise it returns the default (single-tower) DistributionStrategy object.

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/distribute/get_distribution_strategy