Skip to content

Commit b03215d

Browse files
committed
Fix in documentation of "Image classification from scratch" example.
Fixes #2199
1 parent ce7228b commit b03215d

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

examples/vision/image_classification_from_scratch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ def data_augmentation(images):
187187
augmented images, like this:
188188
189189
```python
190-
augmented_train_ds = train_ds.map(
191-
lambda x, y: (data_augmentation(x, training=True), y))
190+
augmented_train_ds = train_ds.map(lambda x, y: (data_augmentation(x), y))
192191
```
193192
194193
With this option, your data augmentation will happen **on CPU**, asynchronously, and will

examples/vision/ipynb/image_classification_from_scratch.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,7 @@
324324
"augmented images, like this:\n",
325325
"\n",
326326
"```python\n",
327-
"augmented_train_ds = train_ds.map(\n",
328-
" lambda x, y: (data_augmentation(x, training=True), y))\n",
327+
"augmented_train_ds = train_ds.map(lambda x, y: (data_augmentation(x), y))\n",
329328
"```\n",
330329
"\n",
331330
"With this option, your data augmentation will happen **on CPU**, asynchronously, and will\n",

examples/vision/md/image_classification_from_scratch.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ If you're training on GPU, this may be a good option.
236236
augmented images, like this:
237237

238238
```python
239-
augmented_train_ds = train_ds.map(
240-
lambda x, y: (data_augmentation(x, training=True), y))
239+
augmented_train_ds = train_ds.map(lambda x, y: (data_augmentation(x), y))
241240
```
242241

243242
With this option, your data augmentation will happen **on CPU**, asynchronously, and will

0 commit comments

Comments
 (0)