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
但是在运行./test.sh时发生报错:
Traceback (most recent call last):
File "test.py", line 34, in
lm_model, lm_vocab, lm_args = init_model(m_path, gpu, "./model/vocab.txt")
File "test.py", line 28, in init_model
lm_model.load_state_dict(ckpt['model'])
File "/usr/local/anaconda3/envs/GPT/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for BIGLM:
size mismatch for tok_embed.weight: copying a param with shape torch.Size([6410, 768]) from checkpoint, the shape in current model is torch.Size([28781, 768]).
size mismatch for out_proj.weight: copying a param with shape torch.Size([6410, 768]) from checkpoint, the shape in current model is torch.Size([28781, 768]).
size mismatch for out_proj.bias: copying a param with shape torch.Size([6410]) from checkpoint, the shape in current model is torch.Size([28781]).
请问这是什么原因导致的呢?非常感谢
The text was updated successfully, but these errors were encountered:
你好 我在训练网络完毕之后 将test.py中的m_path改为了结果中最新的checkpoint的地址
但是在运行./test.sh时发生报错:
Traceback (most recent call last):
File "test.py", line 34, in
lm_model, lm_vocab, lm_args = init_model(m_path, gpu, "./model/vocab.txt")
File "test.py", line 28, in init_model
lm_model.load_state_dict(ckpt['model'])
File "/usr/local/anaconda3/envs/GPT/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for BIGLM:
size mismatch for tok_embed.weight: copying a param with shape torch.Size([6410, 768]) from checkpoint, the shape in current model is torch.Size([28781, 768]).
size mismatch for out_proj.weight: copying a param with shape torch.Size([6410, 768]) from checkpoint, the shape in current model is torch.Size([28781, 768]).
size mismatch for out_proj.bias: copying a param with shape torch.Size([6410]) from checkpoint, the shape in current model is torch.Size([28781]).
请问这是什么原因导致的呢?非常感谢
The text was updated successfully, but these errors were encountered: