Skip to content

Instantly share code, notes, and snippets.

@hadifar
Created January 5, 2019 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadifar/de6d8cf031e8057da7b36fb9ad979c68 to your computer and use it in GitHub Desktop.
Save hadifar/de6d8cf031e8057da7b36fb9ad979c68 to your computer and use it in GitHub Desktop.
NUM_GPUS = 4
strategy = tf.contrib.distribute.MirroredStrategy(num_gpus=NUM_GPUS)
config = tf.estimator.RunConfig(train_distribute=strategy)
estimator = tf.estimator.Estimator(model, config=config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment