@@ -29,11 +29,25 @@ provide a few options.
29
29
Note: These models will ** not** work with TPUs on Colab.
30
30
31
31
You can train image classification models on Cloud TPUs using
32
- ` tf.distribute.TPUStrategy ` . If you are not familiar with Cloud TPUs, it is
33
- strongly recommended that you go through the
32
+ [ tf.distribute.experimental.TPUStrategy] ( https://www.tensorflow.org/api_docs/python/tf/distribute/experimental/TPUStrategy?version=nightly ) .
33
+ If you are not familiar with Cloud TPUs, it is strongly recommended that you go
34
+ through the
34
35
[ quickstart] ( https://cloud.google.com/tpu/docs/quickstart ) to learn how to
35
36
create a TPU and GCE VM.
36
37
38
+ ### Running on multiple GPU hosts
39
+
40
+ You can also train these models on multiple hosts, each with GPUs, using
41
+ [ tf.distribute.experimental.MultiWorkerMirroredStrategy] ( https://www.tensorflow.org/api_docs/python/tf/distribute/experimental/MultiWorkerMirroredStrategy ) .
42
+
43
+ The easiest way to run multi-host benchmarks is to set the
44
+ [ ` TF_CONFIG ` ] ( https://www.tensorflow.org/guide/distributed_training#TF_CONFIG )
45
+ appropriately at each host. e.g., to run using ` MultiWorkerMirroredStrategy ` on
46
+ 2 hosts, the ` cluster ` in ` TF_CONFIG ` should have 2 ` host:port ` entries, and
47
+ host ` i ` should have the ` task ` in ` TF_CONFIG ` set to `{"type": "worker",
48
+ "index": i}` . ` MultiWorkerMirroredStrategy` will automatically use all the
49
+ available GPUs at each host.
50
+
37
51
## MNIST
38
52
39
53
To download the data and run the MNIST sample model locally for the first time,
0 commit comments