I'm using torch.nn.functional.interpolate() to resize an image.
Firstly I use transforms.ToTensor() to transform an image into a tensor, which have size of (3, 252, 252), (252, 252) is the size of the imported image. What I want to do is to create a tensor with size (3, 504, 504) with interpolate() function.
I set the para scale_factor=2, but it returned a (3, 252, 504) tensor. Then I set it like scale_factor=(1,2,2) and received an error of dimensional conflict like this:
size shape must match input shape. Input is 1D, size is 3
So what way should I do to set the parameters in order to receive (3, 504, 504) tensor?