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

checkpoint error #4

Open
Tan-Hexiang opened this issue Mar 14, 2023 · 1 comment
Open

checkpoint error #4

Tan-Hexiang opened this issue Mar 14, 2023 · 1 comment

Comments

@Tan-Hexiang
Copy link

Tan-Hexiang commented Mar 14, 2023

Thanks for releasing the code!
I am trying to run QuestionAnsweringSquadDiffMaskAnalysis.ipynb. but I get this error when load_from_checkpoint()
RuntimeError: Error(s) in loading state_dict for BertQuestionAnsweringSquadDiffMask: Missing key(s) in state_dict: "net.bert.embeddings.position_ids". Unexpected key(s) in state_dict: "net.bert.pooler.dense.weight", "net.bert.pooler.dense.bias"
I have check the model path and models/squad-diffmask-input.ckpt is there. How can i fix it?
@nicola-decao

@Tan-Hexiang
Copy link
Author

Tan-Hexiang commented Mar 14, 2023

OK. I fixed it. This is because i use transformers==4 whose bert is different from transformers==2.9

@github-staff github-staff deleted a comment from p4u1d34n Oct 24, 2024
@github-staff github-staff deleted a comment from p4u1d34n Oct 24, 2024
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