Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

权重使用 #37

Open
vontran2021 opened this issue Mar 18, 2024 · 1 comment
Open

权重使用 #37

vontran2021 opened this issue Mar 18, 2024 · 1 comment

Comments

@vontran2021
Copy link

老师您好,我使用net.load_state_dict(torch.load(model_weight_path, map_location='cpu'))加载模型测试时,出现RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory错误,我的路径没问题,20几个权重都是这个错误,请问是什么原因呢?期待您的解答,我是一名研三学生,在应用您的模型时出现了这个问题,期望您百忙之中抽时间为我解答疑惑,万分感谢!

@HantingChen
Copy link
Collaborator

你好,可能有以下几个原因:1.检查下载的权重是否损坏,尝试重新下载一份权重。2.使用的pytroch版本和requirements里需求的版本没有对应上。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants