Created
January 16, 2020 13:32
-
-
Save RaphaelMeudec/dee851b27bf9eec1eae473ed3bf58bd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define multi-gpu strategy | |
mirrored_strategy = tf.distribute.MirroredStrategy() | |
# Update batch size value | |
batch_size *= mirrored_strategy.num_replicas_in_sync | |
# Create strategy scope to perform training | |
with mirrored_strategy.scope(): | |
model = [...] | |
model.fit(...) |
Is the model.fit(...) called within the scope of
with mirrored_strategy.scope():
or outside of it?
It is called within the scope.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is the model.fit(...) called within the scope of
with mirrored_strategy.scope():
or outside of it?