You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "D:\yao_pytorch\TransReID-main\model\make_model.py", line 206, in load_param
self.state_dict()[i.replace('module.', '')].copy_(param_dict[i])
RuntimeError: The size of tensor a (751) must match the size of tensor b (1041) at non-singleton dimension 0
base.norm.weight torch.Size([768]) torch.Size([768])
base.norm.bias torch.Size([768]) torch.Size([768])
base.fc.weight torch.Size([1000, 768]) torch.Size([1000, 768])
base.fc.bias torch.Size([1000]) torch.Size([1000])
classifier.weight torch.Size([751, 768]) torch.Size([1041, 768])
Traceback (most recent call last):
File "D:\yao_pytorch\TransReID-main\test.py", line 46, in <module>
model.load_param(cfg.TEST.WEIGHT)
File "D:\yao_pytorch\TransReID-main\model\make_model.py", line 206, in load_param
self.state_dict()[i.replace('module.', '')].copy_(param_dict[i])
RuntimeError: The size of tensor a (751) must match the size of tensor b (1041) at non-singleton dimension 0
求教如何解决? 非常感谢。
The text was updated successfully, but these errors were encountered:
您好!当我尝试复现MSMT17的结果遇到问题。下面是我尝试的命令:
python test.py --config_file configs/MSMT17/vit_base.yml MODEL.DEVICE_ID "('0')" TEST.WEIGHT 'vit_base_msmt.pth
遇到了报错:
之后我尝试在 make_model.py 添加
print(i, self.state_dict()[i.replace('module.', '')].shape, param_dict[i].shape)
得到如下结果:求教如何解决? 非常感谢。
The text was updated successfully, but these errors were encountered: