NLPScott/bert-Chinese-classification-task

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

Wangpeiyi9979 opened this issue · 4 comments

您好,很感谢您提供代码,本人水平有限,在执行这一步时:
model.bert.load_state_dict(torch.load(args.init_checkpoint, map_location='cpu'))
遇到以下错误:
RuntimeError: Error(s) in loading state_dict for BertModel: Missing key(s) in state_dict: "embeddings.word_embeddings.weight. ...."
请问这是为什么呢。

the same errors, is there anyone know the way to fix this error? thanks

=================================================================
RuntimeError: Error(s) in loading state_dict for BertModel:
Missing key(s) in state_dict: "embeddings.word_embeddings.weight", "embeddings.position_embeddings.weight", "embeddings.token_type_embeddings.weight", "embeddings.LayerNorm.beta", "embeddings.LayerNorm.gamma", "encoder.layer.0.attention.self.query.bias", "encoder.layer.0.attention.self.query.weight", "encoder.layer.0.attention.self.key.bias", "encoder.layer.0.attention.self.key.weight", "encoder.layer.0.attention.self.value.bias", "encoder.layer.0.attention.self.value.weight", "encoder.layer.0.attention.output.dense.bias", "encoder.layer.0.attention.output.dense.weight", "encoder.layer.0.attention.output.LayerNorm.beta", "encoder.layer.0.attention.output.LayerNorm.gamma", "encoder.layer.0.intermediate.dense.bias", "encoder.layer.0.intermediate.dense.weight", "encoder.layer.0.output.dense.bias", "encoder.layer.0.output.dense.weight", "encoder.layer.0.output.LayerNorm.beta", "encoder.layer.0.output.LayerNorm.gamma", "encoder.layer.1.attention.self.query.bias", "encoder.layer.1.attention.self.query.weight", "encoder.layer.1.attention.self.key.bias", "encoder.layer.1.attention.self.key.weight", "encoder.layer.1.attention.self.value.bias", "encoder.layer.1.attention.self.value.weight", "encoder.layer.1.attention.output.dense.bias", "encoder.layer.1.attention.output.dense.weight", "encoder.layer.1.attention.output.LayerNorm.beta", "encoder.layer.1.attention.output.LayerNorm.gamma", "encoder.layer.1.intermediate.dense.bias", "encoder.layer.1.intermediate.dense.weight", "encoder.layer.1.output.dense.bias", "encoder.layer.1.output.dense.weight", "encoder.layer.1.output.LayerNorm.beta", "encoder.layer.1.output.LayerNorm.gamma", "encoder.layer.2.attention.self.query.bias", "encoder.layer.2.attention.self.query.weight", "encoder.layer.2.attention.self.key.bias", "encoder.layer.2.attention.self.key.weight", "encoder.layer.2.attention.self.value.bias", "encoder.layer.2.attention.self.value.weight", "encoder.layer.2.attention.output.dense.bias", "encoder.layer.2.attention.output.dense.weight", "encoder.layer.2.attention.output.LayerNorm.beta", "encoder.layer.2.attention.output.LayerNorm.gamma", "encoder.layer.2.intermediate.dense.bias", "encoder.layer.2.intermediate.dense.weight", "encoder.layer.2.output.dense.bias", "encoder.layer.2.output.dense.weight", "encoder.layer.2.output.LayerNorm.beta", "encoder.layer.2.output.LayerNorm.gamma", "encoder.layer.3.attention.self.query.bias", "encoder.layer.3.attention.self.query.weight", "encoder.layer.3.attention.self.key.bias", "encoder.layer.3.attention.self.key.weight", "encoder.layer.3.attention.self.value.bias", "encoder.layer.3.attention.self.value.weight", "encoder.layer.3.attention.output.dense.bias", "encoder.layer.3.attention.output.dense.weight", "encoder.layer.3.attention.output.LayerNorm.beta", "encoder.layer.3.attention.output.LayerNorm.gamma", "encoder.layer.3.intermediate.dense.bias", "encoder.layer.3.intermediate.dense.weight", "encoder.layer.3.output.dense.bias", "encoder.layer.3.output.dense.weight", "encoder.layer.3.output.LayerNorm.beta", "encoder.layer.3.output.LayerNorm.gamma", "encoder.layer.4.attention.self.query.bias", "encoder.layer.4.attention.self.query.weight", "encoder.layer.4.attention.self.key.bias", "encoder.layer.4.attention.self.key.weight", "encoder.layer.4.attention.self.value.bias", "encoder.layer.4.attention.self.value.weight", "encoder.layer.4.attention.output.dense.bias", "encoder.layer.4.attention.output.dense.weight", "encoder.layer.4.attention.output.LayerNorm.beta", "encoder.layer.4.attention.output.LayerNorm.gamma", "encoder.layer.4.intermediate.dense.bias", "encoder.layer.4.intermediate.dense.weight", "encoder.layer.4.output.dense.bias", "encoder.layer.4.output.dense.weight", "encoder.layer.4.output.LayerNorm.beta", "encoder.layer.4.output.LayerNorm.gamma", "encoder.layer.5.attention.self.query.bias", "encoder.layer.5.attention.self.query.weight", "encoder.layer.5.attention.self.key.bias", "encoder.layer.5.attention.self.key.weight", "encoder.layer.5.attention.self.value.bias", "encoder.layer.5.attention.self.value.weight", "encoder.layer.5.attention.output.dense.bias", "encoder.layer.5.attention.output.dense.weight", "encoder.layer.5.attention.output.LayerNorm.beta", "encoder.layer.5.attention.output.LayerNorm.gamma", "encoder.layer.5.intermediate.dense.bias", "encoder.layer.5.intermediate.dense.weight", "encoder.layer.5.output.dense.bias", "encoder.layer.5.output.dense.weight", "encoder.layer.5.output.LayerNorm.beta", "encoder.layer.5.output.LayerNorm.gamma", "encoder.layer.6.attention.self.query.bias", "encoder.layer.6.attention.self.query.weight", "encoder.layer.6.attention.self.key.bias", "encoder.layer.6.attention.self.key.weight", "encoder.layer.6.attention.self.value.bias", "encoder.layer.6.attention.self.value.weight", "encoder.layer.6.attention.output.dense.bias", "encoder.layer.6.attention.output.dense.weight", "encoder.layer.6.attention.output.LayerNorm.beta", "encoder.layer.6.attention.output.LayerNorm.gamma", "encoder.layer.6.intermediate.dense.bias", "encoder.layer.6.intermediate.dense.weight", "encoder.layer.6.output.dense.bias", "encoder.layer.6.output.dense.weight", "encoder.layer.6.output.LayerNorm.beta", "encoder.layer.6.output.LayerNorm.gamma", "encoder.layer.7.attention.self.query.bias", "encoder.layer.7.attention.self.query.weight", "encoder.layer.7.attention.self.key.bias", "encoder.layer.7.attention.self.key.weight", "encoder.layer.7.attention.self.value.bias", "encoder.layer.7.attention.self.value.weight", "encoder.layer.7.attention.output.dense.bias", "encoder.layer.7.attention.output.dense.weight", "encoder.layer.7.attention.output.LayerNorm.beta", "encoder.layer.7.attention.output.LayerNorm.gamma", "encoder.layer.7.intermediate.dense.bias", "encoder.layer.7.intermediate.dense.weight", "encoder.layer.7.output.dense.bias", "encoder.layer.7.output.dense.weight", "encoder.layer.7.output.LayerNorm.beta", "encoder.layer.7.output.LayerNorm.gamma", "encoder.layer.8.attention.self.query.bias", "encoder.layer.8.attention.self.query.weight", "encoder.layer.8.attention.self.key.bias", "encoder.layer.8.attention.self.key.weight", "encoder.layer.8.attention.self.value.bias", "encoder.layer.8.attention.self.value.weight", "encoder.layer.8.attention.output.dense.bias", "encoder.layer.8.attention.output.dense.weight", "encoder.layer.8.attention.output.LayerNorm.beta", "encoder.layer.8.attention.output.LayerNorm.gamma", "encoder.layer.8.intermediate.dense.bias", "encoder.layer.8.intermediate.dense.weight", "encoder.layer.8.output.dense.bias", "encoder.layer.8.output.dense.weight", "encoder.layer.8.output.LayerNorm.beta", "encoder.layer.8.output.LayerNorm.gamma", "encoder.layer.9.attention.self.query.bias", "encoder.layer.9.attention.self.query.weight", "encoder.layer.9.attention.self.key.bias", "encoder.layer.9.attention.self.key.weight", "encoder.layer.9.attention.self.value.bias", "encoder.layer.9.attention.self.value.weight", "encoder.layer.9.attention.output.dense.bias", "encoder.layer.9.attention.output.dense.weight", "encoder.layer.9.attention.output.LayerNorm.beta", "encoder.layer.9.attention.output.LayerNorm.gamma", "encoder.layer.9.intermediate.dense.bias", "encoder.layer.9.intermediate.dense.weight", "encoder.layer.9.output.dense.bias", "encoder.layer.9.output.dense.weight", "encoder.layer.9.output.LayerNorm.beta", "encoder.layer.9.output.LayerNorm.gamma", "encoder.layer.10.attention.self.query.bias", "encoder.layer.10.attention.self.query.weight", "encoder.layer.10.attention.self.key.bias", "encoder.layer.10.attention.self.key.weight", "encoder.layer.10.attention.self.value.bias", "encoder.layer.10.attention.self.value.weight", "encoder.layer.10.attention.output.dense.bias", "encoder.layer.10.attention.output.dense.weight", "encoder.layer.10.attention.output.LayerNorm.beta", "encoder.layer.10.attention.output.LayerNorm.gamma", "encoder.layer.10.intermediate.dense.bias", "encoder.layer.10.intermediate.dense.weight", "encoder.layer.10.output.dense.bias", "encoder.layer.10.output.dense.weight", "encoder.layer.10.output.LayerNorm.beta", "encoder.layer.10.output.LayerNorm.gamma", "encoder.layer.11.attention.self.query.bias", "encoder.layer.11.attention.self.query.weight", "encoder.layer.11.attention.self.key.bias", "encoder.layer.11.attention.self.key.weight", "encoder.layer.11.attention.self.value.bias", "encoder.layer.11.attention.self.value.weight", "encoder.layer.11.attention.output.dense.bias", "encoder.layer.11.attention.output.dense.weight", "encoder.layer.11.attention.output.LayerNorm.beta", "encoder.layer.11.attention.output.LayerNorm.gamma", "encoder.layer.11.intermediate.dense.bias", "encoder.layer.11.intermediate.dense.weight", "encoder.layer.11.output.dense.bias", "encoder.layer.11.output.dense.weight", "encoder.layer.11.output.LayerNorm.beta", "encoder.layer.11.output.LayerNorm.gamma", "pooler.dense.bias", "pooler.dense.weight".
Unexpected key(s) in state_dict: "bert.embeddings.word_embeddings.weight", "bert.embeddings.position_embeddings.weight", "bert.embeddings.token_type_embeddings.weight", "bert.embeddings.LayerNorm.weight", "bert.embeddings.LayerNorm.bias", "bert.encoder.layer.0.attention.self.query.weight", "bert.encoder.layer.0.attention.self.query.bias", "bert.encoder.layer.0.attention.self.key.weight", "bert.encoder.layer.0.attention.self.key.bias", "bert.encoder.layer.0.attention.self.value.weight", "bert.encoder.layer.0.attention.self.value.bias", "bert.encoder.layer.0.attention.output.dense.weight", "bert.encoder.layer.0.attention.output.dense.bias", "bert.encoder.layer.0.attention.output.LayerNorm.weight", "bert.encoder.layer.0.attention.output.LayerNorm.bias", "bert.encoder.layer.0.intermediate.dense.weight", "bert.encoder.layer.0.intermediate.dense.bias", "bert.encoder.layer.0.output.dense.weight", "bert.encoder.layer.0.output.dense.bias", "bert.encoder.layer.0.output.LayerNorm.weight", "bert.encoder.layer.0.output.LayerNorm.bias", "bert.encoder.layer.1.attention.self.query.weight", "bert.encoder.layer.1.attention.self.query.bias", "bert.encoder.layer.1.attention.self.key.weight", "bert.encoder.layer.1.attention.self.key.bias", "bert.encoder.layer.1.attention.self.value.weight", "bert.encoder.layer.1.attention.self.value.bias", "bert.encoder.layer.1.attention.output.dense.weight", "bert.encoder.layer.1.attention.output.dense.bias", "bert.encoder.layer.1.attention.output.LayerNorm.weight", "bert.encoder.layer.1.attention.output.LayerNorm.bias", "bert.encoder.layer.1.intermediate.dense.weight", "bert.encoder.layer.1.intermediate.dense.bias", "bert.encoder.layer.1.output.dense.weight", "bert.encoder.layer.1.output.dense.bias", "bert.encoder.layer.1.output.LayerNorm.weight", "bert.encoder.layer.1.output.LayerNorm.bias", "bert.encoder.layer.2.attention.self.query.weight", "bert.encoder.layer.2.attention.self.query.bias", "bert.encoder.layer.2.attention.self.key.weight", "bert.encoder.layer.2.attention.self.key.bias", "bert.encoder.layer.2.attention.self.value.weight", "bert.encoder.layer.2.attention.self.value.bias", "bert.encoder.layer.2.attention.output.dense.weight", "bert.encoder.layer.2.attention.output.dense.bias", "bert.encoder.layer.2.attention.output.LayerNorm.weight", "bert.encoder.layer.2.attention.output.LayerNorm.bias", "bert.encoder.layer.2.intermediate.dense.weight", "bert.encoder.layer.2.intermediate.dense.bias", "bert.encoder.layer.2.output.dense.weight", "bert.encoder.layer.2.output.dense.bias", "bert.encoder.layer.2.output.LayerNorm.weight", "bert.encoder.layer.2.output.LayerNorm.bias", "bert.encoder.layer.3.attention.self.query.weight", "bert.encoder.layer.3.attention.self.query.bias", "bert.encoder.layer.3.attention.self.key.weight", "bert.encoder.layer.3.attention.self.key.bias", "bert.encoder.layer.3.attention.self.value.weight", "bert.encoder.layer.3.attention.self.value.bias", "bert.encoder.layer.3.attention.output.dense.weight", "bert.encoder.layer.3.attention.output.dense.bias", "bert.encoder.layer.3.attention.output.LayerNorm.weight", "bert.encoder.layer.3.attention.output.LayerNorm.bias", "bert.encoder.layer.3.intermediate.dense.weight", "bert.encoder.layer.3.intermediate.dense.bias", "bert.encoder.layer.3.output.dense.weight", "bert.encoder.layer.3.output.dense.bias", "bert.encoder.layer.3.output.LayerNorm.weight", "bert.encoder.layer.3.output.LayerNorm.bias", "bert.encoder.layer.4.attention.self.query.weight", "bert.encoder.layer.4.attention.self.query.bias", "bert.encoder.layer.4.attention.self.key.weight", "bert.encoder.layer.4.attention.self.key.bias", "bert.encoder.layer.4.attention.self.value.weight", "bert.encoder.layer.4.attention.self.value.bias", "bert.encoder.layer.4.attention.output.dense.weight", "bert.encoder.layer.4.attention.output.dense.bias", "bert.encoder.layer.4.attention.output.LayerNorm.weight", "bert.encoder.layer.4.attention.output.LayerNorm.bias", "bert.encoder.layer.4.intermediate.dense.weight", "bert.encoder.layer.4.intermediate.dense.bias", "bert.encoder.layer.4.output.dense.weight", "bert.encoder.layer.4.output.dense.bias", "bert.encoder.layer.4.output.LayerNorm.weight", "bert.encoder.layer.4.output.LayerNorm.bias", "bert.encoder.layer.5.attention.self.query.weight", "bert.encoder.layer.5.attention.self.query.bias", "bert.encoder.layer.5.attention.self.key.weight", "bert.encoder.layer.5.attention.self.key.bias", "bert.encoder.layer.5.attention.self.value.weight", "bert.encoder.layer.5.attention.self.value.bias", "bert.encoder.layer.5.attention.output.dense.weight", "bert.encoder.layer.5.attention.output.dense.bias", "bert.encoder.layer.5.attention.output.LayerNorm.weight", "bert.encoder.layer.5.attention.output.LayerNorm.bias", "bert.encoder.layer.5.intermediate.dense.weight", "bert.encoder.layer.5.intermediate.dense.bias", "bert.encoder.layer.5.output.dense.weight", "bert.encoder.layer.5.output.dense.bias", "bert.encoder.layer.5.output.LayerNorm.weight", "bert.encoder.layer.5.output.LayerNorm.bias", "bert.encoder.layer.6.attention.self.query.weight", "bert.encoder.layer.6.attention.self.query.bias", "bert.encoder.layer.6.attention.self.key.weight", "bert.encoder.layer.6.attention.self.key.bias", "bert.encoder.layer.6.attention.self.value.weight", "bert.encoder.layer.6.attention.self.value.bias", "bert.encoder.layer.6.attention.output.dense.weight", "bert.encoder.layer.6.attention.output.dense.bias", "bert.encoder.layer.6.attention.output.LayerNorm.weight", "bert.encoder.layer.6.attention.output.LayerNorm.bias", "bert.encoder.layer.6.intermediate.dense.weight", "bert.encoder.layer.6.intermediate.dense.bias", "bert.encoder.layer.6.output.dense.weight", "bert.encoder.layer.6.output.dense.bias", "bert.encoder.layer.6.output.LayerNorm.weight", "bert.encoder.layer.6.output.LayerNorm.bias", "bert.encoder.layer.7.attention.self.query.weight", "bert.encoder.layer.7.attention.self.query.bias", "bert.encoder.layer.7.attention.self.key.weight", "bert.encoder.layer.7.attention.self.key.bias", "bert.encoder.layer.7.attention.self.value.weight", "bert.encoder.layer.7.attention.self.value.bias", "bert.encoder.layer.7.attention.output.dense.weight", "bert.encoder.layer.7.attention.output.dense.bias", "bert.encoder.layer.7.attention.output.LayerNorm.weight", "bert.encoder.layer.7.attention.output.LayerNorm.bias", "bert.encoder.layer.7.intermediate.dense.weight", "bert.encoder.layer.7.intermediate.dense.bias", "bert.encoder.layer.7.output.dense.weight", "bert.encoder.layer.7.output.dense.bias", "bert.encoder.layer.7.output.LayerNorm.weight", "bert.encoder.layer.7.output.LayerNorm.bias", "bert.encoder.layer.8.attention.self.query.weight", "bert.encoder.layer.8.attention.self.query.bias", "bert.encoder.layer.8.attention.self.key.weight", "bert.encoder.layer.8.attention.self.key.bias", "bert.encoder.layer.8.attention.self.value.weight", "bert.encoder.layer.8.attention.self.value.bias", "bert.encoder.layer.8.attention.output.dense.weight", "bert.encoder.layer.8.attention.output.dense.bias", "bert.encoder.layer.8.attention.output.LayerNorm.weight", "bert.encoder.layer.8.attention.output.LayerNorm.bias", "bert.encoder.layer.8.intermediate.dense.weight", "bert.encoder.layer.8.intermediate.dense.bias", "bert.encoder.layer.8.output.dense.weight", "bert.encoder.layer.8.output.dense.bias", "bert.encoder.layer.8.output.LayerNorm.weight", "bert.encoder.layer.8.output.LayerNorm.bias", "bert.encoder.layer.9.attention.self.query.weight", "bert.encoder.layer.9.attention.self.query.bias", "bert.encoder.layer.9.attention.self.key.weight", "bert.encoder.layer.9.attention.self.key.bias", "bert.encoder.layer.9.attention.self.value.weight", "bert.encoder.layer.9.attention.self.value.bias", "bert.encoder.layer.9.attention.output.dense.weight", "bert.encoder.layer.9.attention.output.dense.bias", "bert.encoder.layer.9.attention.output.LayerNorm.weight", "bert.encoder.layer.9.attention.output.LayerNorm.bias", "bert.encoder.layer.9.intermediate.dense.weight", "bert.encoder.layer.9.intermediate.dense.bias", "bert.encoder.layer.9.output.dense.weight", "bert.encoder.layer.9.output.dense.bias", "bert.encoder.layer.9.output.LayerNorm.weight", "bert.encoder.layer.9.output.LayerNorm.bias", "bert.encoder.layer.10.attention.self.query.weight", "bert.encoder.layer.10.attention.self.query.bias", "bert.encoder.layer.10.attention.self.key.weight", "bert.encoder.layer.10.attention.self.key.bias", "bert.encoder.layer.10.attention.self.value.weight", "bert.encoder.layer.10.attention.self.value.bias", "bert.encoder.layer.10.attention.output.dense.weight", "bert.encoder.layer.10.attention.output.dense.bias", "bert.encoder.layer.10.attention.output.LayerNorm.weight", "bert.encoder.layer.10.attention.output.LayerNorm.bias", "bert.encoder.layer.10.intermediate.dense.weight", "bert.encoder.layer.10.intermediate.dense.bias", "bert.encoder.layer.10.output.dense.weight", "bert.encoder.layer.10.output.dense.bias", "bert.encoder.layer.10.output.LayerNorm.weight", "bert.encoder.layer.10.output.LayerNorm.bias", "bert.encoder.layer.11.attention.self.query.weight", "bert.encoder.layer.11.attention.self.query.bias", "bert.encoder.layer.11.attention.self.key.weight", "bert.encoder.layer.11.attention.self.key.bias", "bert.encoder.layer.11.attention.self.value.weight", "bert.encoder.layer.11.attention.self.value.bias", "bert.encoder.layer.11.attention.output.dense.weight", "bert.encoder.layer.11.attention.output.dense.bias", "bert.encoder.layer.11.attention.output.LayerNorm.weight", "bert.encoder.layer.11.attention.output.LayerNorm.bias", "bert.encoder.layer.11.intermediate.dense.weight", "bert.encoder.layer.11.intermediate.dense.bias", "bert.encoder.layer.11.output.dense.weight", "bert.encoder.layer.11.output.dense.bias", "bert.encoder.layer.11.output.LayerNorm.weight", "bert.encoder.layer.11.output.LayerNorm.bias", "bert.pooler.dense.weight", "bert.pooler.dense.bias", "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".

你好,请问一下您这边解决这个问题了吗?我在使用转化后的pytorch 模型 也出现了同样的错误,请教一下这个问题是怎么解决的呢

我也是同样的错误

the same errors, is there anyone know the way to fix this error? thanks

=================================================================
RuntimeError: Error(s) in loading state_dict for BertModel:
Missing key(s) in state_dict: "embeddings.word_embeddings.weight", "embeddings.position_embeddings.weight", "embeddings.token_type_embeddings.weight", "embeddings.LayerNorm.beta", "embeddings.LayerNorm.gamma", "encoder.layer.0.attention.self.query.bias", "encoder.layer.0.attention.self.query.weight", "encoder.layer.0.attention.self.key.bias", "encoder.layer.0.attention.self.key.weight", "encoder.layer.0.attention.self.value.bias", "encoder.layer.0.attention.self.value.weight", "encoder.layer.0.attention.output.dense.bias", "encoder.layer.0.attention.output.dense.weight", "encoder.layer.0.attention.output.LayerNorm.beta", "encoder.layer.0.attention.output.LayerNorm.gamma", "encoder.layer.0.intermediate.dense.bias", "encoder.layer.0.intermediate.dense.weight", "encoder.layer.0.output.dense.bias", "encoder.layer.0.output.dense.weight", "encoder.layer.0.output.LayerNorm.beta", "encoder.layer.0.output.LayerNorm.gamma", "encoder.layer.1.attention.self.query.bias", "encoder.layer.1.attention.self.query.weight", "encoder.layer.1.attention.self.key.bias", "encoder.layer.1.attention.self.key.weight", "encoder.layer.1.attention.self.value.bias", "encoder.layer.1.attention.self.value.weight", "encoder.layer.1.attention.output.dense.bias", "encoder.layer.1.attention.output.dense.weight", "encoder.layer.1.attention.output.LayerNorm.beta", "encoder.layer.1.attention.output.LayerNorm.gamma", "encoder.layer.1.intermediate.dense.bias", "encoder.layer.1.intermediate.dense.weight", "encoder.layer.1.output.dense.bias", "encoder.layer.1.output.dense.weight", "encoder.layer.1.output.LayerNorm.beta", "encoder.layer.1.output.LayerNorm.gamma", "encoder.layer.2.attention.self.query.bias", "encoder.layer.2.attention.self.query.weight", "encoder.layer.2.attention.self.key.bias", "encoder.layer.2.attention.self.key.weight", "encoder.layer.2.attention.self.value.bias", "encoder.layer.2.attention.self.value.weight", "encoder.layer.2.attention.output.dense.bias", "encoder.layer.2.attention.output.dense.weight", "encoder.layer.2.attention.output.LayerNorm.beta", "encoder.layer.2.attention.output.LayerNorm.gamma", "encoder.layer.2.intermediate.dense.bias", "encoder.layer.2.intermediate.dense.weight", "encoder.layer.2.output.dense.bias", "encoder.layer.2.output.dense.weight", "encoder.layer.2.output.LayerNorm.beta", "encoder.layer.2.output.LayerNorm.gamma", "encoder.layer.3.attention.self.query.bias", "encoder.layer.3.attention.self.query.weight", "encoder.layer.3.attention.self.key.bias", "encoder.layer.3.attention.self.key.weight", "encoder.layer.3.attention.self.value.bias", "encoder.layer.3.attention.self.value.weight", "encoder.layer.3.attention.output.dense.bias", "encoder.layer.3.attention.output.dense.weight", "encoder.layer.3.attention.output.LayerNorm.beta", "encoder.layer.3.attention.output.LayerNorm.gamma", "encoder.layer.3.intermediate.dense.bias", "encoder.layer.3.intermediate.dense.weight", "encoder.layer.3.output.dense.bias", "encoder.layer.3.output.dense.weight", "encoder.layer.3.output.LayerNorm.beta", "encoder.layer.3.output.LayerNorm.gamma", "encoder.layer.4.attention.self.query.bias", "encoder.layer.4.attention.self.query.weight", "encoder.layer.4.attention.self.key.bias", "encoder.layer.4.attention.self.key.weight", "encoder.layer.4.attention.self.value.bias", "encoder.layer.4.attention.self.value.weight", "encoder.layer.4.attention.output.dense.bias", "encoder.layer.4.attention.output.dense.weight", "encoder.layer.4.attention.output.LayerNorm.beta", "encoder.layer.4.attention.output.LayerNorm.gamma", "encoder.layer.4.intermediate.dense.bias", "encoder.layer.4.intermediate.dense.weight", "encoder.layer.4.output.dense.bias", "encoder.layer.4.output.dense.weight", "encoder.layer.4.output.LayerNorm.beta", "encoder.layer.4.output.LayerNorm.gamma", "encoder.layer.5.attention.self.query.bias", "encoder.layer.5.attention.self.query.weight", "encoder.layer.5.attention.self.key.bias", "encoder.layer.5.attention.self.key.weight", "encoder.layer.5.attention.self.value.bias", "encoder.layer.5.attention.self.value.weight", "encoder.layer.5.attention.output.dense.bias", "encoder.layer.5.attention.output.dense.weight", "encoder.layer.5.attention.output.LayerNorm.beta", "encoder.layer.5.attention.output.LayerNorm.gamma", "encoder.layer.5.intermediate.dense.bias", "encoder.layer.5.intermediate.dense.weight", "encoder.layer.5.output.dense.bias", "encoder.layer.5.output.dense.weight", "encoder.layer.5.output.LayerNorm.beta", "encoder.layer.5.output.LayerNorm.gamma", "encoder.layer.6.attention.self.query.bias", "encoder.layer.6.attention.self.query.weight", "encoder.layer.6.attention.self.key.bias", "encoder.layer.6.attention.self.key.weight", "encoder.layer.6.attention.self.value.bias", "encoder.layer.6.attention.self.value.weight", "encoder.layer.6.attention.output.dense.bias", "encoder.layer.6.attention.output.dense.weight", "encoder.layer.6.attention.output.LayerNorm.beta", "encoder.layer.6.attention.output.LayerNorm.gamma", "encoder.layer.6.intermediate.dense.bias", "encoder.layer.6.intermediate.dense.weight", "encoder.layer.6.output.dense.bias", "encoder.layer.6.output.dense.weight", "encoder.layer.6.output.LayerNorm.beta", "encoder.layer.6.output.LayerNorm.gamma", "encoder.layer.7.attention.self.query.bias", "encoder.layer.7.attention.self.query.weight", "encoder.layer.7.attention.self.key.bias", "encoder.layer.7.attention.self.key.weight", "encoder.layer.7.attention.self.value.bias", "encoder.layer.7.attention.self.value.weight", "encoder.layer.7.attention.output.dense.bias", "encoder.layer.7.attention.output.dense.weight", "encoder.layer.7.attention.output.LayerNorm.beta", "encoder.layer.7.attention.output.LayerNorm.gamma", "encoder.layer.7.intermediate.dense.bias", "encoder.layer.7.intermediate.dense.weight", "encoder.layer.7.output.dense.bias", "encoder.layer.7.output.dense.weight", "encoder.layer.7.output.LayerNorm.beta", "encoder.layer.7.output.LayerNorm.gamma", "encoder.layer.8.attention.self.query.bias", "encoder.layer.8.attention.self.query.weight", "encoder.layer.8.attention.self.key.bias", "encoder.layer.8.attention.self.key.weight", "encoder.layer.8.attention.self.value.bias", "encoder.layer.8.attention.self.value.weight", "encoder.layer.8.attention.output.dense.bias", "encoder.layer.8.attention.output.dense.weight", "encoder.layer.8.attention.output.LayerNorm.beta", "encoder.layer.8.attention.output.LayerNorm.gamma", "encoder.layer.8.intermediate.dense.bias", "encoder.layer.8.intermediate.dense.weight", "encoder.layer.8.output.dense.bias", "encoder.layer.8.output.dense.weight", "encoder.layer.8.output.LayerNorm.beta", "encoder.layer.8.output.LayerNorm.gamma", "encoder.layer.9.attention.self.query.bias", "encoder.layer.9.attention.self.query.weight", "encoder.layer.9.attention.self.key.bias", "encoder.layer.9.attention.self.key.weight", "encoder.layer.9.attention.self.value.bias", "encoder.layer.9.attention.self.value.weight", "encoder.layer.9.attention.output.dense.bias", "encoder.layer.9.attention.output.dense.weight", "encoder.layer.9.attention.output.LayerNorm.beta", "encoder.layer.9.attention.output.LayerNorm.gamma", "encoder.layer.9.intermediate.dense.bias", "encoder.layer.9.intermediate.dense.weight", "encoder.layer.9.output.dense.bias", "encoder.layer.9.output.dense.weight", "encoder.layer.9.output.LayerNorm.beta", "encoder.layer.9.output.LayerNorm.gamma", "encoder.layer.10.attention.self.query.bias", "encoder.layer.10.attention.self.query.weight", "encoder.layer.10.attention.self.key.bias", "encoder.layer.10.attention.self.key.weight", "encoder.layer.10.attention.self.value.bias", "encoder.layer.10.attention.self.value.weight", "encoder.layer.10.attention.output.dense.bias", "encoder.layer.10.attention.output.dense.weight", "encoder.layer.10.attention.output.LayerNorm.beta", "encoder.layer.10.attention.output.LayerNorm.gamma", "encoder.layer.10.intermediate.dense.bias", "encoder.layer.10.intermediate.dense.weight", "encoder.layer.10.output.dense.bias", "encoder.layer.10.output.dense.weight", "encoder.layer.10.output.LayerNorm.beta", "encoder.layer.10.output.LayerNorm.gamma", "encoder.layer.11.attention.self.query.bias", "encoder.layer.11.attention.self.query.weight", "encoder.layer.11.attention.self.key.bias", "encoder.layer.11.attention.self.key.weight", "encoder.layer.11.attention.self.value.bias", "encoder.layer.11.attention.self.value.weight", "encoder.layer.11.attention.output.dense.bias", "encoder.layer.11.attention.output.dense.weight", "encoder.layer.11.attention.output.LayerNorm.beta", "encoder.layer.11.attention.output.LayerNorm.gamma", "encoder.layer.11.intermediate.dense.bias", "encoder.layer.11.intermediate.dense.weight", "encoder.layer.11.output.dense.bias", "encoder.layer.11.output.dense.weight", "encoder.layer.11.output.LayerNorm.beta", "encoder.layer.11.output.LayerNorm.gamma", "pooler.dense.bias", "pooler.dense.weight".
Unexpected key(s) in state_dict: "bert.embeddings.word_embeddings.weight", "bert.embeddings.position_embeddings.weight", "bert.embeddings.token_type_embeddings.weight", "bert.embeddings.LayerNorm.weight", "bert.embeddings.LayerNorm.bias", "bert.encoder.layer.0.attention.self.query.weight", "bert.encoder.layer.0.attention.self.query.bias", "bert.encoder.layer.0.attention.self.key.weight", "bert.encoder.layer.0.attention.self.key.bias", "bert.encoder.layer.0.attention.self.value.weight", "bert.encoder.layer.0.attention.self.value.bias", "bert.encoder.layer.0.attention.output.dense.weight", "bert.encoder.layer.0.attention.output.dense.bias", "bert.encoder.layer.0.attention.output.LayerNorm.weight", "bert.encoder.layer.0.attention.output.LayerNorm.bias", "bert.encoder.layer.0.intermediate.dense.weight", "bert.encoder.layer.0.intermediate.dense.bias", "bert.encoder.layer.0.output.dense.weight", "bert.encoder.layer.0.output.dense.bias", "bert.encoder.layer.0.output.LayerNorm.weight", "bert.encoder.layer.0.output.LayerNorm.bias", "bert.encoder.layer.1.attention.self.query.weight", "bert.encoder.layer.1.attention.self.query.bias", "bert.encoder.layer.1.attention.self.key.weight", "bert.encoder.layer.1.attention.self.key.bias", "bert.encoder.layer.1.attention.self.value.weight", "bert.encoder.layer.1.attention.self.value.bias", "bert.encoder.layer.1.attention.output.dense.weight", "bert.encoder.layer.1.attention.output.dense.bias", "bert.encoder.layer.1.attention.output.LayerNorm.weight", "bert.encoder.layer.1.attention.output.LayerNorm.bias", "bert.encoder.layer.1.intermediate.dense.weight", "bert.encoder.layer.1.intermediate.dense.bias", "bert.encoder.layer.1.output.dense.weight", "bert.encoder.layer.1.output.dense.bias", "bert.encoder.layer.1.output.LayerNorm.weight", "bert.encoder.layer.1.output.LayerNorm.bias", "bert.encoder.layer.2.attention.self.query.weight", "bert.encoder.layer.2.attention.self.query.bias", "bert.encoder.layer.2.attention.self.key.weight", "bert.encoder.layer.2.attention.self.key.bias", "bert.encoder.layer.2.attention.self.value.weight", "bert.encoder.layer.2.attention.self.value.bias", "bert.encoder.layer.2.attention.output.dense.weight", "bert.encoder.layer.2.attention.output.dense.bias", "bert.encoder.layer.2.attention.output.LayerNorm.weight", "bert.encoder.layer.2.attention.output.LayerNorm.bias", "bert.encoder.layer.2.intermediate.dense.weight", "bert.encoder.layer.2.intermediate.dense.bias", "bert.encoder.layer.2.output.dense.weight", "bert.encoder.layer.2.output.dense.bias", "bert.encoder.layer.2.output.LayerNorm.weight", "bert.encoder.layer.2.output.LayerNorm.bias", "bert.encoder.layer.3.attention.self.query.weight", "bert.encoder.layer.3.attention.self.query.bias", "bert.encoder.layer.3.attention.self.key.weight", "bert.encoder.layer.3.attention.self.key.bias", "bert.encoder.layer.3.attention.self.value.weight", "bert.encoder.layer.3.attention.self.value.bias", "bert.encoder.layer.3.attention.output.dense.weight", "bert.encoder.layer.3.attention.output.dense.bias", "bert.encoder.layer.3.attention.output.LayerNorm.weight", "bert.encoder.layer.3.attention.output.LayerNorm.bias", "bert.encoder.layer.3.intermediate.dense.weight", "bert.encoder.layer.3.intermediate.dense.bias", "bert.encoder.layer.3.output.dense.weight", "bert.encoder.layer.3.output.dense.bias", "bert.encoder.layer.3.output.LayerNorm.weight", "bert.encoder.layer.3.output.LayerNorm.bias", "bert.encoder.layer.4.attention.self.query.weight", "bert.encoder.layer.4.attention.self.query.bias", "bert.encoder.layer.4.attention.self.key.weight", "bert.encoder.layer.4.attention.self.key.bias", "bert.encoder.layer.4.attention.self.value.weight", "bert.encoder.layer.4.attention.self.value.bias", "bert.encoder.layer.4.attention.output.dense.weight", "bert.encoder.layer.4.attention.output.dense.bias", "bert.encoder.layer.4.attention.output.LayerNorm.weight", "bert.encoder.layer.4.attention.output.LayerNorm.bias", "bert.encoder.layer.4.intermediate.dense.weight", "bert.encoder.layer.4.intermediate.dense.bias", "bert.encoder.layer.4.output.dense.weight", "bert.encoder.layer.4.output.dense.bias", "bert.encoder.layer.4.output.LayerNorm.weight", "bert.encoder.layer.4.output.LayerNorm.bias", "bert.encoder.layer.5.attention.self.query.weight", "bert.encoder.layer.5.attention.self.query.bias", "bert.encoder.layer.5.attention.self.key.weight", "bert.encoder.layer.5.attention.self.key.bias", "bert.encoder.layer.5.attention.self.value.weight", "bert.encoder.layer.5.attention.self.value.bias", "bert.encoder.layer.5.attention.output.dense.weight", "bert.encoder.layer.5.attention.output.dense.bias", "bert.encoder.layer.5.attention.output.LayerNorm.weight", "bert.encoder.layer.5.attention.output.LayerNorm.bias", "bert.encoder.layer.5.intermediate.dense.weight", "bert.encoder.layer.5.intermediate.dense.bias", "bert.encoder.layer.5.output.dense.weight", "bert.encoder.layer.5.output.dense.bias", "bert.encoder.layer.5.output.LayerNorm.weight", "bert.encoder.layer.5.output.LayerNorm.bias", "bert.encoder.layer.6.attention.self.query.weight", "bert.encoder.layer.6.attention.self.query.bias", "bert.encoder.layer.6.attention.self.key.weight", "bert.encoder.layer.6.attention.self.key.bias", "bert.encoder.layer.6.attention.self.value.weight", "bert.encoder.layer.6.attention.self.value.bias", "bert.encoder.layer.6.attention.output.dense.weight", "bert.encoder.layer.6.attention.output.dense.bias", "bert.encoder.layer.6.attention.output.LayerNorm.weight", "bert.encoder.layer.6.attention.output.LayerNorm.bias", "bert.encoder.layer.6.intermediate.dense.weight", "bert.encoder.layer.6.intermediate.dense.bias", "bert.encoder.layer.6.output.dense.weight", "bert.encoder.layer.6.output.dense.bias", "bert.encoder.layer.6.output.LayerNorm.weight", "bert.encoder.layer.6.output.LayerNorm.bias", "bert.encoder.layer.7.attention.self.query.weight", "bert.encoder.layer.7.attention.self.query.bias", "bert.encoder.layer.7.attention.self.key.weight", "bert.encoder.layer.7.attention.self.key.bias", "bert.encoder.layer.7.attention.self.value.weight", "bert.encoder.layer.7.attention.self.value.bias", "bert.encoder.layer.7.attention.output.dense.weight", "bert.encoder.layer.7.attention.output.dense.bias", "bert.encoder.layer.7.attention.output.LayerNorm.weight", "bert.encoder.layer.7.attention.output.LayerNorm.bias", "bert.encoder.layer.7.intermediate.dense.weight", "bert.encoder.layer.7.intermediate.dense.bias", "bert.encoder.layer.7.output.dense.weight", "bert.encoder.layer.7.output.dense.bias", "bert.encoder.layer.7.output.LayerNorm.weight", "bert.encoder.layer.7.output.LayerNorm.bias", "bert.encoder.layer.8.attention.self.query.weight", "bert.encoder.layer.8.attention.self.query.bias", "bert.encoder.layer.8.attention.self.key.weight", "bert.encoder.layer.8.attention.self.key.bias", "bert.encoder.layer.8.attention.self.value.weight", "bert.encoder.layer.8.attention.self.value.bias", "bert.encoder.layer.8.attention.output.dense.weight", "bert.encoder.layer.8.attention.output.dense.bias", "bert.encoder.layer.8.attention.output.LayerNorm.weight", "bert.encoder.layer.8.attention.output.LayerNorm.bias", "bert.encoder.layer.8.intermediate.dense.weight", "bert.encoder.layer.8.intermediate.dense.bias", "bert.encoder.layer.8.output.dense.weight", "bert.encoder.layer.8.output.dense.bias", "bert.encoder.layer.8.output.LayerNorm.weight", "bert.encoder.layer.8.output.LayerNorm.bias", "bert.encoder.layer.9.attention.self.query.weight", "bert.encoder.layer.9.attention.self.query.bias", "bert.encoder.layer.9.attention.self.key.weight", "bert.encoder.layer.9.attention.self.key.bias", "bert.encoder.layer.9.attention.self.value.weight", "bert.encoder.layer.9.attention.self.value.bias", "bert.encoder.layer.9.attention.output.dense.weight", "bert.encoder.layer.9.attention.output.dense.bias", "bert.encoder.layer.9.attention.output.LayerNorm.weight", "bert.encoder.layer.9.attention.output.LayerNorm.bias", "bert.encoder.layer.9.intermediate.dense.weight", "bert.encoder.layer.9.intermediate.dense.bias", "bert.encoder.layer.9.output.dense.weight", "bert.encoder.layer.9.output.dense.bias", "bert.encoder.layer.9.output.LayerNorm.weight", "bert.encoder.layer.9.output.LayerNorm.bias", "bert.encoder.layer.10.attention.self.query.weight", "bert.encoder.layer.10.attention.self.query.bias", "bert.encoder.layer.10.attention.self.key.weight", "bert.encoder.layer.10.attention.self.key.bias", "bert.encoder.layer.10.attention.self.value.weight", "bert.encoder.layer.10.attention.self.value.bias", "bert.encoder.layer.10.attention.output.dense.weight", "bert.encoder.layer.10.attention.output.dense.bias", "bert.encoder.layer.10.attention.output.LayerNorm.weight", "bert.encoder.layer.10.attention.output.LayerNorm.bias", "bert.encoder.layer.10.intermediate.dense.weight", "bert.encoder.layer.10.intermediate.dense.bias", "bert.encoder.layer.10.output.dense.weight", "bert.encoder.layer.10.output.dense.bias", "bert.encoder.layer.10.output.LayerNorm.weight", "bert.encoder.layer.10.output.LayerNorm.bias", "bert.encoder.layer.11.attention.self.query.weight", "bert.encoder.layer.11.attention.self.query.bias", "bert.encoder.layer.11.attention.self.key.weight", "bert.encoder.layer.11.attention.self.key.bias", "bert.encoder.layer.11.attention.self.value.weight", "bert.encoder.layer.11.attention.self.value.bias", "bert.encoder.layer.11.attention.output.dense.weight", "bert.encoder.layer.11.attention.output.dense.bias", "bert.encoder.layer.11.attention.output.LayerNorm.weight", "bert.encoder.layer.11.attention.output.LayerNorm.bias", "bert.encoder.layer.11.intermediate.dense.weight", "bert.encoder.layer.11.intermediate.dense.bias", "bert.encoder.layer.11.output.dense.weight", "bert.encoder.layer.11.output.dense.bias", "bert.encoder.layer.11.output.LayerNorm.weight", "bert.encoder.layer.11.output.LayerNorm.bias", "bert.pooler.dense.weight", "bert.pooler.dense.bias", "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".

你问题解决了么