@@ -358,7 +358,9 @@ def resize(img: Tensor, size: List[int], interpolation: InterpolationMode = Inte
358
358
the smaller edge of the image will be matched to this number maintaining
359
359
the aspect ratio. i.e, if height > width, then image will be rescaled to
360
360
:math:`\left(\text{size} \times \frac{\text{height}}{\text{width}}, \text{size}\right)`.
361
- In torchscript mode size as single int is not supported, use a sequence of length 1: ``[size, ]``.
361
+
362
+ .. note::
363
+ In torchscript mode size as single int is not supported, use a sequence of length 1: ``[size, ]``.
362
364
interpolation (InterpolationMode): Desired interpolation enum defined by
363
365
:class:`torchvision.transforms.InterpolationMode`.
364
366
Default is ``InterpolationMode.BILINEAR``. If input is Tensor, only ``InterpolationMode.NEAREST``,
@@ -413,7 +415,10 @@ def pad(img: Tensor, padding: List[int], fill: int = 0, padding_mode: str = "con
413
415
is used to pad all borders. If sequence of length 2 is provided this is the padding
414
416
on left/right and top/bottom respectively. If a sequence of length 4 is provided
415
417
this is the padding for the left, top, right and bottom borders respectively.
416
- In torchscript mode padding as single int is not supported, use a sequence of length 1: ``[padding, ]``.
418
+
419
+ .. note::
420
+ In torchscript mode padding as single int is not supported, use a sequence of
421
+ length 1: ``[padding, ]``.
417
422
fill (number or str or tuple): Pixel fill value for constant fill. Default is 0.
418
423
If a tuple of length 3, it is used to fill R, G, B channels respectively.
419
424
This value is only used when the padding_mode is constant.
@@ -608,9 +613,10 @@ def perspective(
608
613
For backward compatibility integer values (e.g. ``PIL.Image.NEAREST``) are still acceptable.
609
614
fill (sequence or number, optional): Pixel fill value for the area outside the transformed
610
615
image. If given a number, the value is used for all bands respectively.
611
- In torchscript mode single int/float value is not supported, please use a sequence
612
- of length 1: ``[value, ]``.
613
- If input is PIL Image, the options is only available for ``Pillow>=5.0.0``.
616
+
617
+ .. note::
618
+ In torchscript mode single int/float value is not supported, please use a sequence
619
+ of length 1: ``[value, ]``.
614
620
615
621
Returns:
616
622
PIL Image or Tensor: transformed Image.
@@ -938,9 +944,10 @@ def rotate(
938
944
Default is the center of the image.
939
945
fill (sequence or number, optional): Pixel fill value for the area outside the transformed
940
946
image. If given a number, the value is used for all bands respectively.
941
- In torchscript mode single int/float value is not supported, please use a sequence
942
- of length 1: ``[value, ]``.
943
- If input is PIL Image, the options is only available for ``Pillow>=5.2.0``.
947
+
948
+ .. note::
949
+ In torchscript mode single int/float value is not supported, please use a sequence
950
+ of length 1: ``[value, ]``.
944
951
945
952
Returns:
946
953
PIL Image or Tensor: Rotated image.
@@ -1010,9 +1017,10 @@ def affine(
1010
1017
For backward compatibility integer values (e.g. ``PIL.Image.NEAREST``) are still acceptable.
1011
1018
fill (sequence or number, optional): Pixel fill value for the area outside the transformed
1012
1019
image. If given a number, the value is used for all bands respectively.
1013
- In torchscript mode single int/float value is not supported, please use a sequence
1014
- of length 1: ``[value, ]``.
1015
- If input is PIL Image, the options is only available for ``Pillow>=5.0.0``.
1020
+
1021
+ .. note::
1022
+ In torchscript mode single int/float value is not supported, please use a sequence
1023
+ of length 1: ``[value, ]``.
1016
1024
fillcolor (sequence, int, float): deprecated argument and will be removed since v0.10.0.
1017
1025
Please use the ``fill`` parameter instead.
1018
1026
resample (int, optional): deprecated argument and will be removed since v0.10.0.
@@ -1173,13 +1181,19 @@ def gaussian_blur(img: Tensor, kernel_size: List[int], sigma: Optional[List[floa
1173
1181
img (PIL Image or Tensor): Image to be blurred
1174
1182
kernel_size (sequence of ints or int): Gaussian kernel size. Can be a sequence of integers
1175
1183
like ``(kx, ky)`` or a single integer for square kernels.
1176
- In torchscript mode kernel_size as single int is not supported, use a sequence of length 1: ``[ksize, ]``.
1184
+
1185
+ .. note::
1186
+ In torchscript mode kernel_size as single int is not supported, use a sequence of
1187
+ length 1: ``[ksize, ]``.
1177
1188
sigma (sequence of floats or float, optional): Gaussian kernel standard deviation. Can be a
1178
1189
sequence of floats like ``(sigma_x, sigma_y)`` or a single float to define the
1179
1190
same sigma in both X/Y directions. If None, then it is computed using
1180
1191
``kernel_size`` as ``sigma = 0.3 * ((kernel_size - 1) * 0.5 - 1) + 0.8``.
1181
- Default, None. In torchscript mode sigma as single float is
1182
- not supported, use a sequence of length 1: ``[sigma, ]``.
1192
+ Default, None.
1193
+
1194
+ .. note::
1195
+ In torchscript mode sigma as single float is
1196
+ not supported, use a sequence of length 1: ``[sigma, ]``.
1183
1197
1184
1198
Returns:
1185
1199
PIL Image or Tensor: Gaussian Blurred version of the image.
0 commit comments