Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mirrored_strategy = tf.distribute.MirroredStrategy(devices=["/gpu:0", "/gpu:1"])
- with mirrored_strategy.scope():
- model = tf.keras.Sequential([tf.keras.layers.Dense(1, input_shape=(1,))])
- optimizer = tf.keras.optimizers.SGD()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement