yitu-opensource/T2T-ViT

How to change the input size of the picture?

mikaizhu opened this issue · 1 comments

when my input image size is (3, 260, 260), then it went wrong....

RuntimeError:the size of tensor a(260) must match the size of tensor b(3) at non-singleton dimention 0

but when i resize the image (3, 256, 256), and it works.

so, how to change the input size of the picture?

Hi,

You can change the image size but the image size should be 16^n, as we do three soft split with strides [4,2,2], and 4x2x2=16.
For you case, 260/16=16.25 is not an integer, 256/16=16 is an integer, so you can use 256 but not 260.