Skip to content

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

@Wangpeiyi9979

Description

@Wangpeiyi9979

您好,很感谢您提供代码,本人水平有限,在执行这一步时:
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. ...."
请问这是为什么呢。

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