Closed Zxl1556180489 closed 1 year ago
How to solve this problem?
I am facing the same issue. Were you able to resolve it ??
I am facing the same issue. Were you able to resolve it ??
yes, you can contact me via WeChat 15074682652
WeChat isn't available in my region, is there some other way I can contact you??
Or can you explain the solution here itself??
Traceback (most recent call last): File "scripts/train_collective_stage2_dynamic.py", line 58, in train_net(cfg) File "./train_net_dynamic.py", line 83, in train_net model.loadmodel(cfg.stage1_model_path) File "./infer_model.py", line 1222, in loadmodel self.fc_emb_1.load_state_dict(state['fc_emb_state_dict']) File "/home/hi/.conda/envs/lj0.1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1045, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for Linear: size mismatch for weight: copying a param with shape torch.Size([1024, 26400]) from checkpoint, the shape in current model is torch.Size([1024, 12800]).
Sorry for this late reply. You may need to check the out_size
in the script to align it with the actual output size.
Traceback (most recent call last): File "scripts/train_collective_stage2_dynamic.py", line 58, in
train_net(cfg)
File "./train_net_dynamic.py", line 83, in train_net
model.loadmodel(cfg.stage1_model_path)
File "./infer_model.py", line 1222, in loadmodel
self.fc_emb_1.load_state_dict(state['fc_emb_state_dict'])
File "/home/hi/.conda/envs/lj0.1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1045, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Linear:
size mismatch for weight: copying a param with shape torch.Size([1024, 26400]) from checkpoint, the shape in current model is torch.Size([1024, 12800]).