| View source on GitHub | 
Returns the current tf.distribute.Strategy object.
tf.distribute.get_strategy()
Typically only used in a cross-replica context:
if tf.distribute.in_cross_replica_context(): strategy = tf.distribute.get_strategy() ...
| Returns | |
|---|---|
| A tf.distribute.Strategyobject. Inside awith strategy.scope()block, it returnsstrategy, otherwise it returns the default (single-replica)tf.distribute.Strategyobject. | 
    © 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
    https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/distribute/get_strategy