diffmask icon indicating copy to clipboard operation
diffmask copied to clipboard

checkpoint error

Open Tan-Hexiang opened this issue 1 year ago • 2 comments

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 avatar Mar 14 '23 14:03 Tan-Hexiang

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

Tan-Hexiang avatar Mar 14 '23 14:03 Tan-Hexiang