An error occurs when an image of 512 size is given as input.
Closed this issue · 2 comments
jeongHwarr commented
Hello.I really aprreciate for your project.
However, The following error occurs when a 512-size image is input at Attention
class.
dots = dots + relative_bias
RuntimeError: The size of tensor a (1024) must match the size of tensor b (196) at non-singleton dimension 3.
Line 155 in d3ef1c3
Why this error is occured? How do I edit your code when I want to resize the image?
Thank you!
chinhsuanwu commented
Hi @jeongHwarr
If you are not using images with size 224x224, you should modify the first argument in CoAtNet.
For example,
net = CoAtNet((512, 512), 3, num_blocks, channels, num_classes=1000)
jeongHwarr commented
@chinhsuanwu Oh.. my.. I forgot that! I really really thank you so much! Have a good day. Thank you for your contribution!