Open
Description
🐛 Describe the bug
torchvision version: linux condaforge '0.13.1+cu113'
import torch
import torchvision
# Breaks
"""
ValueError: Input and output must have the same number of spatial dimensions, but got input with with spatial dimensions of [640] and output size of [960, 1280]. Please provide input tensor in (N, C, d1, d2, ...,dK) format and output size in (o1, o2, ...,oK) format.
"""
a = torch.zeros((480, 640))
a = torchvision.transforms.functional.resize(a, (2 * 480, 2 * 640))
print(a.shape)
# Works
b = torch.zeros((480, 640))
b = b.unsqueeze(0)
print(b.shape)
b = torchvision.transforms.functional.resize(b, (2 * 480, 2 * 640))
print(b.shape)
Versions
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
cc @vfdev-5