File tree Expand file tree Collapse file tree 3 files changed +21
-21
lines changed Expand file tree Collapse file tree 3 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -423,13 +423,13 @@ def resize(
423423 supported.
424424 The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well.
425425 max_size (int, optional): The maximum allowed for the longer edge of
426- the resized image: if the longer edge of the image is greater
427- than ``max_size`` after being resized according to ``size``, then
428- the image is resized again so that the longer edge is equal to
429- ``max_size``. As a result, ``size`` might be overruled, i.e. the
430- smaller edge may be shorter than ``size``. This is only supported
431- if ``size`` is an int (or a sequence of length 1 in torchscript
432- mode).
426+ the resized image. If the longer edge of the image is greater
427+ than ``max_size`` after being resized according to ``size``,
428+ ``size`` will be overruled so that the longer edge is equal to
429+ ``max_size``.
430+ As a result, the smaller edge may be shorter than ``size``. This
431+ is only supported if ``size`` is an int (or a sequence of length
432+ 1 in torchscript mode).
433433 antialias (bool, optional): Whether to apply antialiasing.
434434 It only affects **tensors** with bilinear or bicubic modes and it is
435435 ignored otherwise: on PIL images, antialiasing is always applied on
Original file line number Diff line number Diff line change @@ -307,13 +307,13 @@ class Resize(torch.nn.Module):
307307 ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported.
308308 The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well.
309309 max_size (int, optional): The maximum allowed for the longer edge of
310- the resized image: if the longer edge of the image is greater
311- than ``max_size`` after being resized according to ``size``, then
312- the image is resized again so that the longer edge is equal to
313- ``max_size``. As a result, ``size`` might be overruled, i.e. the
314- smaller edge may be shorter than ``size``. This is only supported
315- if ``size`` is an int (or a sequence of length 1 in torchscript
316- mode).
310+ the resized image. If the longer edge of the image is greater
311+ than ``max_size`` after being resized according to ``size``,
312+ ``size`` will be overruled so that the longer edge is equal to
313+ ``max_size``.
314+ As a result, the smaller edge may be shorter than ``size``. This
315+ is only supported if ``size`` is an int (or a sequence of length
316+ 1 in torchscript mode).
317317 antialias (bool, optional): Whether to apply antialiasing.
318318 It only affects **tensors** with bilinear or bicubic modes and it is
319319 ignored otherwise: on PIL images, antialiasing is always applied on
Original file line number Diff line number Diff line change @@ -97,13 +97,13 @@ class Resize(Transform):
9797 ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported.
9898 The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well.
9999 max_size (int, optional): The maximum allowed for the longer edge of
100- the resized image: if the longer edge of the image is greater
101- than ``max_size`` after being resized according to ``size``, then
102- the image is resized again so that the longer edge is equal to
103- ``max_size``. As a result, ``size`` might be overruled, i.e. the
104- smaller edge may be shorter than ``size``. This is only supported
105- if ``size`` is an int (or a sequence of length 1 in torchscript
106- mode).
100+ the resized image. If the longer edge of the image is greater
101+ than ``max_size`` after being resized according to ``size``,
102+ ``size`` will be overruled so that the longer edge is equal to
103+ ``max_size``.
104+ As a result, the smaller edge may be shorter than ``size``. This
105+ is only supported if ``size`` is an int (or a sequence of length
106+ 1 in torchscript mode).
107107 antialias (bool, optional): Whether to apply antialiasing.
108108 It only affects **tensors** with bilinear or bicubic modes and it is
109109 ignored otherwise: on PIL images, antialiasing is always applied on
You can’t perform that action at this time.
0 commit comments