Skip to content

Commit 7b9d30e

Browse files
authored
Transforms documentation clean-up (#3200)
* Initial doc clean-up * Remove all private docs * Rename files * Highlight backend inconsistencies * Sequence and number * [Need checking] AutoAugment related doc change * Revert name changes
1 parent 8c0bb6c commit 7b9d30e

File tree

5 files changed

+188
-881
lines changed

5 files changed

+188
-881
lines changed

torchvision/transforms/autoaugment.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,18 @@ def _get_magnitudes():
127127
class AutoAugment(torch.nn.Module):
128128
r"""AutoAugment data augmentation method based on
129129
`"AutoAugment: Learning Augmentation Strategies from Data" <https://arxiv.org/pdf/1805.09501.pdf>`_.
130-
The image can be a PIL Image or a Tensor, in which case it is expected
131-
to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions.
130+
If the image is torch Tensor, it should be of type torch.uint8, and it is expected
131+
to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
132+
If img is PIL Image, it is expected to be in mode "L" or "RGB".
132133
133134
Args:
134135
policy (AutoAugmentPolicy): Desired policy enum defined by
135136
:class:`torchvision.transforms.autoaugment.AutoAugmentPolicy`. Default is ``AutoAugmentPolicy.IMAGENET``.
136137
interpolation (InterpolationMode): Desired interpolation enum defined by
137138
:class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``.
138139
If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported.
139-
fill (sequence or int or float, optional): Pixel fill value for the area outside the transformed
140-
image. If int or float, the value is used for all bands respectively.
141-
This option is supported for PIL image and Tensor inputs.
140+
fill (sequence or number, optional): Pixel fill value for the area outside the transformed
141+
image. If given a number, the value is used for all bands respectively.
142142
If input is PIL Image, the options is only available for ``Pillow>=5.0.0``.
143143
144144
Example:

0 commit comments

Comments
 (0)