Traceback (most recent call last):
File "eval.py", line 84, in
feat = net(image, only_feat=True)
File "/home/ar94990/miniconda3/envs/usb/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/ar94990/Semi-supervised-learning/semilearn/nets/vit/vit.py", line 220, in forward
x = self.extract(x)
File "/home/ar94990/Semi-supervised-learning/semilearn/nets/vit/vit.py", line 203, in extract
x = self.pos_drop(x + self.pos_embed)
RuntimeError: The size of tensor a (5) must match the size of tensor b (37) at non-singleton dimension 1
Bug
Running eval.py produces this bug of dimension mismatch. I changed the net value in the eval.py to 'vit_base_patch16_96' as well.
Reproduce the Bug
Running the command :
Error Messages and Logs
Traceback (most recent call last): File "eval.py", line 84, in
feat = net(image, only_feat=True)
File "/home/ar94990/miniconda3/envs/usb/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/ar94990/Semi-supervised-learning/semilearn/nets/vit/vit.py", line 220, in forward
x = self.extract(x)
File "/home/ar94990/Semi-supervised-learning/semilearn/nets/vit/vit.py", line 203, in extract
x = self.pos_drop(x + self.pos_embed)
RuntimeError: The size of tensor a (5) must match the size of tensor b (37) at non-singleton dimension 1