-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: The size of tensor a (173) must match the size of tensor b (160) at non-singleton dimension 0 #29
Comments
是不是fc的大小不一致,可以把parameter的key打印出来就知道是哪个地方出错啦 |
请问你解决了吗?我这边也遇到类似错误 |
Hi, Thank you for sharing the code
I want to use your pretrained model on Vehicle ReID datasets, so I'll be gratefull if you mention where I'm wrong. Thanks |
Hi all , Did you figure out the fix for this issue? Am facing the same issue and there's no update for a while :( Github issue: #70 |
@KingH12138 您好,我在训练duke数据集以及自己采集的数据集,出现这个问题,尝试采用您发表那个解决方法以及各种方法都解决不掉,您可以为我解答解答吗?RuntimeError: The size of tensor a (128) must match the size of tensor b (768) at non-singleton dimension 3 |
It's a usal mistake when you bulid your model. However, I can't judge reasons beacause of your inadequate mistake information. To my best, I think there's either something wrong internally with the forward function in your model, or there's something wrong with your logic for reading in the data. Of course, I think the former is more likely. |
@KingH12138 ,Ok,I know it,i will try to solve it,thank you~ |
想问一下,我自己写了veri wild 的数据读入部分,我想直接用在veri数据集上训练的模型测试一下在veri wild上的结果,然后报错了,请问还要修改哪里呢?
完整的报错信息是这样的:
Traceback (most recent call last): File "test.py", line 53, in model.load_param(cfg.TEST.WEIGHT) File "E:\Win_Pycharm_Project\TransReID-main\TransReID-main\model\make_model.py", line 376, in load_param self.state_dict()[i.replace('module.', '')].copy_(param_dict[i]) RuntimeError: The size of tensor a (173) must match the size of tensor b (160) at non-singleton dimension 0
麻烦大佬了~~~
The text was updated successfully, but these errors were encountered: