Open 13331112522 opened 3 years ago
I have encountered the same problem as yours. Could you please tell me how you fix this problem? Thank you in advance!!! @miriambellver @gianniskazakos
Try this bert_model.load_state_dict(checkpoint['bert_model'],strict=False)
When loading the ck_model para which download the pretrained checkpoints bert_pretrained_refcoco.zip and unzip and put in the /checkpoints_bert/ folder. The error occured as below:
RuntimeError: Error(s) in loading state_dict for BertModel: Missing key(s) in state_dict: "embeddings.position_ids".
The corresponding code was bert_model.load_state_dict(checkpoint['bert_model'])