Skip to content

loading state_dict for BertModel #25

Description

@AwsomeName

您好,非常感谢您的代码:
我在调试的时候,下载了谷歌的chinese_base压缩包,解压后,用https://github.com/huggingface/pytorch-pretrained-BERT/tree/1de35b624b9d7998feb4d518e4f7e8e53abac4e1的方法转化成bin。或者是用https://github.com/NLPScott/bert-Chinese-classification-task/issues/13这里提供的chinese版本,都会遇到模型载入的错误。
RuntimeError: Error(s) in loading state_dict for BertModel:
Missing key(s) in state_dict: "embeddings.word_embeddings.weight",
可以发现是模型的名字对应错误,应该是名字有了调整,这里我解决不了,您能帮忙看看吗?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions