@@ -127,18 +127,18 @@ def _get_magnitudes():
127
127
class AutoAugment (torch .nn .Module ):
128
128
r"""AutoAugment data augmentation method based on
129
129
`"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".
132
133
133
134
Args:
134
135
policy (AutoAugmentPolicy): Desired policy enum defined by
135
136
:class:`torchvision.transforms.autoaugment.AutoAugmentPolicy`. Default is ``AutoAugmentPolicy.IMAGENET``.
136
137
interpolation (InterpolationMode): Desired interpolation enum defined by
137
138
:class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``.
138
139
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.
142
142
If input is PIL Image, the options is only available for ``Pillow>=5.0.0``.
143
143
144
144
Example:
0 commit comments