Maclory / Deep-Iterative-Collaboration

Pytorch implementation of Deep Face Super-Resolution with Iterative Collaboration between Attentive Recovery and Landmark Estimation (CVPR 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Runtime error: Size of tensor A must match size of tensor B

ZeeRizvee opened this issue · comments

Greetings.

I am trying to run the code on separate images. My first question is that, is it necessary for the input to this algorithm to have the same width and height (a square image)?
If so, I have tried resizing the image to convert it into an image with the same number of pixels in its width and height. When I have given this resized image as input, I get the error, "RuntimeError: The size of tensor a (17) must match the size of tensor b (16) at non-singleton dimension 3". The input image is a small one below 64x64 pixels always. Interestingly, the algorithm works for some of these images and gives the 8x upscaled output, but fails with this error for most of the images.
Can you kindly guide me over what is causing this error?

Hi, the width and height are unnecessary to be equal. However, you might need to check the output size of each module for forward propagation.

I'm not sure what you mean by that. Can you kindly guide further? I'm working with DICGAN CelebA pre-trained weights.