Skip to content
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

Error while reoloading checkpoint #18

Open
cin-levi opened this issue Oct 23, 2020 · 0 comments
Open

Error while reoloading checkpoint #18

cin-levi opened this issue Oct 23, 2020 · 0 comments

Comments

@cin-levi
Copy link

Log:
Traceback (most recent call last): File "utils/checkpoint_converter.py", line 21, in <module> dump_bert_model(checkpoint, output) File "utils/checkpoint_converter.py", line 11, in dump_bert_model model = SequenceTaggingTransformer.load_from_checkpoint(checkpoint) File "/home/levi/levi/anaconda3_server1/envs/torch_nlp/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 153, in load_from_checkpoint model = cls._load_model_state(checkpoint, *args, strict=strict, **kwargs) File "/home/levi/levi/anaconda3_server1/envs/torch_nlp/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 192, in _load_model_state model.load_state_dict(checkpoint['state_dict'], strict=strict) File "/home/levi/levi/anaconda3_server1/envs/torch_nlp/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 SequenceTaggingTransformer: Unexpected key(s) in state_dict: "model.bert.embeddings.position_ids".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant