Skip to content

Commit 8fe439e

Browse files
authored
[DOC] Adds Documentation for AutoAugmentation (#3529)
* add _all for autoaugment * adds docs * add docs, test locally * refactored as per code review
1 parent 797fd26 commit 8fe439e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs/source/transforms.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Compositions of transforms
5757

5858
.. autoclass:: Compose
5959

60+
6061
Transforms on PIL Image and torch.\*Tensor
6162
------------------------------------------
6263

@@ -156,6 +157,22 @@ Generic Transforms
156157
:members:
157158

158159

160+
AutoAugment Transforms
161+
----------------------
162+
163+
`AutoAugment <https://arxiv.org/pdf/1805.09501.pdf>`_ is a common Data Augmentation technique that can improve the accuracy of Image Classification models.
164+
Though the data augmentation policies are directly linked to their trained dataset, empirical studies show that
165+
ImageNet policies provide significant improvements when applied to other datasets.
166+
In TorchVision we implemented 3 policies learned on the following datasets: ImageNet, CIFAR10 and SVHN.
167+
The new transform can be used standalone or mixed-and-matched with existing transforms:
168+
169+
.. autoclass:: AutoAugmentPolicy
170+
:members:
171+
172+
.. autoclass:: AutoAugment
173+
:members:
174+
175+
159176
Functional Transforms
160177
---------------------
161178

torchvision/transforms/autoaugment.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77

88
from . import functional as F, InterpolationMode
99

10+
__all__ = ["AutoAugmentPolicy", "AutoAugment"]
11+
1012

1113
class AutoAugmentPolicy(Enum):
1214
"""AutoAugment policies learned on different datasets.
15+
Available policies are IMAGENET, CIFAR10 and SVHN.
1316
"""
1417
IMAGENET = "imagenet"
1518
CIFAR10 = "cifar10"

0 commit comments

Comments
 (0)