Skip to content

Unexpected key(s) in state_dict when loading the model for evaluation #3

@JessicaLopezEspejel

Description

@JessicaLopezEspejel

Hello,
Thank you for this work, I find it very interesting.
I have an issue running the code of evaluation on the test set after training the model. I get this error when the program tries to load the weights of the checkpoint model

Traceback (most recent call last): File "/home/users/jlopez/codes/transabs/evaluate.py", line 184, in <module> main(args) File "/home/users/jlopez/codes/transabs/evaluate.py", line 131, in main dh_model.load_state_dict(state_dict) File "/home/users/jlopez/.conda/envs/transabs_env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 769, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for LMModel: Unexpected key(s) in state_dict: "transformer.article_embed.weight", "transformer.summary_embed.weight".

I hope you can help me fix the problem soon. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions