Skip to content

Commit 61a0f1e

Browse files
Be more clear about train_step and test_step
Be more clear that the train_step and test_step are also moved to the accelerator. This was not clear before. This makes it explicit, which should help people understanding TPU efficiency.
1 parent d1d54d1 commit 61a0f1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/en/guide/distributed_training.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@
508508
"Here's what you need to change in your code:\n",
509509
"\n",
510510
"1. Create an instance of the appropriate `tf.distribute.Strategy`.\n",
511-
"2. Move the creation of Keras model, optimizer and metrics inside `strategy.scope`.\n",
511+
"2. Move the creation of Keras model, optimizer and metrics inside `strategy.scope`. Thus the code in the model's run(), train_step(), and test_step() will all be distributed and executed on the accelerator(s).\n",
512512
"\n",
513513
"TensorFlow distribution strategies support all types of Keras models—[Sequential](/keras/sequential_model.ipynb), [Functional](/keras/functional.ipynb), and [subclassed](/keras/custom_layers_and_models.ipynb).\n",
514514
"\n",

0 commit comments

Comments
 (0)