In torchvision version 0.16.2+cu121 resizing a numpy array won’t resize and doesn’t give back any errors/warnings for not resizing due to the input type. I don’t know if this is intended but it might cause some confusion.
from torchvision.transforms.v2 import Resize
import numpy as np
img = np.random.randint(255,size=(1024,2048))
img_size = (256,512)
trans = Resize(img_size, antialias=True)
transimg=trans(npimg)
(npimg==transimg).all()
transimg.shape