Created
January 20, 2022 14:36
-
-
Save dpoulopoulos/554f6dcd45a2d4566566c5e8c4c07539 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
strategy = tf.distribute.MirroredStrategy() | |
BATCH_SIZE = 64 | |
GLOBAL_BATCH_SIZE = BATCH_SIZE * strategy.num_replicas_in_sync | |
train_data = tf.data.Dataset(...).batch(GLOBAL_BATCH_SIZE) | |
with strategy.scope(): | |
model = tf.keras.Sequential(...) | |
model.compile(...) | |
model.fit(train_data, epochs=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment