Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename deprecated call to experimental_distribute_datasets_from_function #2287

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions site/en/guide/tpu.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
"source": [
"### Train the model using a custom training loop\n",
"\n",
"You can also create and train your model using `tf.function` and `tf.distribute` APIs directly. You can use the `Strategy.experimental_distribute_datasets_from_function` API to distribute the `tf.data.Dataset` given a dataset function. Note that in the example below the batch size passed into the `Dataset` is the per-replica batch size instead of the global batch size. To learn more, check out the [Custom training with `tf.distribute.Strategy`](../tutorials/distribute/custom_training.ipynb) tutorial.\n"
"You can also create and train your model using `tf.function` and `tf.distribute` APIs directly. You can use the `Strategy.distribute_datasets_from_function` API to distribute the `tf.data.Dataset` given a dataset function. Note that in the example below the batch size passed into the `Dataset` is the per-replica batch size instead of the global batch size. To learn more, check out the [Custom training with `tf.distribute.Strategy`](../tutorials/distribute/custom_training.ipynb) tutorial.\n"
]
},
{
Expand Down Expand Up @@ -449,7 +449,7 @@
"# on each TPU worker.\n",
"per_replica_batch_size = batch_size // strategy.num_replicas_in_sync\n",
"\n",
"train_dataset = strategy.experimental_distribute_datasets_from_function(\n",
"train_dataset = strategy.distribute_datasets_from_function(\n",
" lambda _: get_dataset(per_replica_batch_size, is_training=True))\n",
"\n",
"@tf.function\n",
Expand Down Expand Up @@ -600,4 +600,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
Loading