lonePatient / albert_pytorch

A Lite Bert For Self-Supervised Learning Language Representations
Apache License 2.0
710 stars 152 forks source link

RuntimeError: Error(s) in loading state_dict for BertModel #25

Open ZiteHe opened 4 years ago

ZiteHe commented 4 years ago

RuntimeError: Error(s) in loading state_dict for BertModel: size mismatch for bert.embeddings.word_embeddings.weight: copying a param with shape torch.Size([21128, 128]) from checkpoint, the shape in current model is torch.Size([21128, 312]).

Can anyone help with this issue? I used the convert file but it seems there is some problem with the param size in checkpoint? Thank u

SUFEHeisenberg commented 4 years ago

I met the same problem when applying albert_tinyzh in pytorch, have you solved the problem? Forword to ur reply. ^^