Skip to content

Commit f75272f

Browse files
authored
Bugfix for accimage test on functional_pil.resize image (#6208)
1 parent fb7f9a1 commit f75272f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/transforms/functional_pil.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import numpy as np
55
import torch
6-
from PIL import Image, ImageOps, ImageEnhance
6+
from PIL import Image, ImageEnhance, ImageOps
77
from typing_extensions import Literal
88

99
try:
@@ -249,7 +249,7 @@ def resize(
249249
if not (isinstance(size, list) and len(size) == 2):
250250
raise TypeError(f"Got inappropriate size arg: {size}")
251251

252-
return img.resize(size[::-1], interpolation)
252+
return img.resize(tuple(size[::-1]), interpolation)
253253

254254

255255
@torch.jit.unused

0 commit comments

Comments
 (0)