Closed dbdikcn closed 7 months ago
Feel free to ask!
The 'load param' code in the backbone is identical to that used in TOP-ReID. In TOP-ReID, I didn't make any adjustments when loading the parameters. You should set the checkpoint here and verify whether the param_dict has been loaded correctly.
I'm sorry to bother you. I have confirmed that the param_dict failed to load successfully. But there is no solution yet.
That's all right, check my personal website, and you can find my QQ or WeChat, we can communicate easily!
Well. I add your qq
你好 我也遇到相同问题 请问怎么解决的
Traceback (most recent call last): File "/home/tiancun/EDITOR/modeling/backbones/vit_pytorch.py", line 666, in load_param self.statedict()[k].copy(v) KeyError: 'state_dict_ema'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/tiancun/EDITOR/train_net.py", line 71, in
model = make_model(cfg, num_class=num_classes, camera_num=camera_num)
File "/home/tiancun/EDITOR/modeling/make_model.py", line 372, in make_model
model = EDITOR(num_class, cfg, camera_num, __factory_T_type)
File "/home/tiancun/EDITOR/modeling/make_model.py", line 89, in init
self.BACKBONE = build_transformer(num_classes, cfg, camera_num, factory)
File "/home/tiancun/EDITOR/modeling/make_model.py", line 63, in init
self.base.load_param(model_path)
File "/home/tiancun/EDITOR/modeling/backbones/vit_pytorch.py", line 669, in load_param
print('shape do not match in k :{}: param_dict{} vs self.state_dict(){}'.format(k, v.shape,
AttributeError: 'dict' object has no attribute 'shape'
Sorry to bother you. When I was training RGBNT201, I used pre-training 82.6_T2T_ViTt_24_pth and this error occurred. How did you solve it?