Commit 8f1b8d37 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Add a mirrored strategy

parent 91613d6f
Pipeline #51953 failed with stage
in 4 minutes and 29 seconds
import tensorflow as tf
def strategy_fn():
print("Creating MirroredStrategy strategy.")
strategy = tf.distribute.MirroredStrategy()
print("MirroredStrategy strategy created.")
print("Number of devices: {}".format(strategy.num_replicas_in_sync))
return strategy
......@@ -57,6 +57,7 @@ setup(
# entry points for bob keras fit --strategy-fn option
"bob.learn.tensorflow.strategy": [
"multi-worker-mirrored-strategy = bob.learn.tensorflow.configs.MultiWorkerMirroredStrategy:strategy_fn",
"mirrored-strategy = bob.learn.tensorflow.configs.MirroredStrategy:strategy_fn",
# Classifiers are important if you plan to distribute this package through
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment