Skip to content

用xlsearch训练时,最后得到torch.nn.modules.module._IncompatibleKeys文件 #7

@Liunanzhu

Description

@Liunanzhu

老师您好,我想咨询在使用 raynardj/yuan/tree/main/nbs 中的 xlsearch.ipynb 进行训练时,最后得到了一个torch.nn.modules.module._IncompatibleKeys文件的事情,

在执行过:module.load_state_dict(torch.load(best, map_location="cpu")['state_dict']) 之后,
我将它保存为pytorch_model.bin文件:Ptorch.save(module,"···/pytorch_model.bin")

然后我想调用这个模型测试一下训练效果(embedder = SentenceTransformer()),报错提示:
no sentence-transformers model found with name ```. Creating a new one with MEAN pooling.

求问这个文件要怎样才能作为一个模型测试它的训练结果,感谢感谢

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