songyingxin / Bert-TextClassification

Implemention some Baseline Model upon Bert for Text Classification
Other
682 stars 149 forks source link

Missing key(s) in state_dict: "classifier.weight", "classifier.bias". #8

Closed km1994 closed 4 years ago

km1994 commented 5 years ago

File "D:\progrom\python\python\python3\lib\site-packages\torch\nn\modules\module.py", line 719, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for BertOrigin: Missing key(s) in state_dict: "classifier.weight", "classifier.bias". Unexpected key(s) in state_dict: "cls.predictions.bias", "cls.predictions.transform.dense.weight", "cls.predictions.transform.dense.bias", "cls.predictions.transform.LayerNorm.weight", "cls.predictions.transform.LayerNorm.bias", "cls.predictions.decoder.weight", "cls.seq_relationship.weight", "cls.seq_relationship.bias".

hi-wangyan commented 4 years ago

@km1994 Do you have solve the problem? I also miss the mistake

PhoebusSi commented 4 years ago

@km1994 Do you have solved the problem? I also miss the mistake