Skip to content

Commit

Permalink
[PyTorch] Fix d2l-ai#1719: Update 13.1.2 transform text (d2l-ai#1724)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhDagar authored Apr 19, 2021
1 parent 212fe81 commit 3c3af90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chapter_computer-vision/image-augmentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,20 @@ test_augs = torchvision.transforms.Compose([
torchvision.transforms.ToTensor()])
```

:begin_tab:`mxnet`
Next, we define an auxiliary function to make it easier to read the image and
apply image augmentation. The `transform_first` function provided by Gluon's
dataset applies image augmentation to the first element of each training
example (image and label), i.e., the element at the top of the image. For
detailed descriptions of `DataLoader`, refer to :numref:`sec_fashion_mnist`.
:end_tab:

:begin_tab:`pytorch`
Next, we define an auxiliary function to make it easier to read the image and
apply image augmentation. The `transform` argument provided by PyTorch's
dataset applies augmentation to transform the images. For detailed
descriptions of `DataLoader`, refer to :numref:`sec_fashion_mnist`.
:end_tab:

```{.python .input}
def load_cifar10(is_train, augs, batch_size):
Expand Down

0 comments on commit 3c3af90

Please sign in to comment.