diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py index 1676aa2b744..5760642c780 100644 --- a/torchvision/transforms/functional.py +++ b/torchvision/transforms/functional.py @@ -424,10 +424,10 @@ def resize( The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. max_size (int, optional): The maximum allowed for the longer edge of the resized image. If the longer edge of the image is greater - than ``max_size`` after being resized according to ``size``, + than ``max_size`` after being resized according to ``size``, ``size`` will be overruled so that the longer edge is equal to ``max_size``. - As a result, the smaller edge may be shorter than ``size``. This + As a result, the smaller edge may be shorter than ``size``. This is only supported if ``size`` is an int (or a sequence of length 1 in torchscript mode). antialias (bool, optional): Whether to apply antialiasing. diff --git a/torchvision/transforms/transforms.py b/torchvision/transforms/transforms.py index 1edf772bc8f..d0290f93249 100644 --- a/torchvision/transforms/transforms.py +++ b/torchvision/transforms/transforms.py @@ -308,10 +308,10 @@ class Resize(torch.nn.Module): The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. max_size (int, optional): The maximum allowed for the longer edge of the resized image. If the longer edge of the image is greater - than ``max_size`` after being resized according to ``size``, + than ``max_size`` after being resized according to ``size``, ``size`` will be overruled so that the longer edge is equal to ``max_size``. - As a result, the smaller edge may be shorter than ``size``. This + As a result, the smaller edge may be shorter than ``size``. This is only supported if ``size`` is an int (or a sequence of length 1 in torchscript mode). antialias (bool, optional): Whether to apply antialiasing. diff --git a/torchvision/transforms/v2/_geometry.py b/torchvision/transforms/v2/_geometry.py index 1a52816394d..731d768c2a6 100644 --- a/torchvision/transforms/v2/_geometry.py +++ b/torchvision/transforms/v2/_geometry.py @@ -98,10 +98,10 @@ class Resize(Transform): The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. max_size (int, optional): The maximum allowed for the longer edge of the resized image. If the longer edge of the image is greater - than ``max_size`` after being resized according to ``size``, + than ``max_size`` after being resized according to ``size``, ``size`` will be overruled so that the longer edge is equal to ``max_size``. - As a result, the smaller edge may be shorter than ``size``. This + As a result, the smaller edge may be shorter than ``size``. This is only supported if ``size`` is an int (or a sequence of length 1 in torchscript mode). antialias (bool, optional): Whether to apply antialiasing.