大佬教程收集整理的这篇文章主要介绍了pytorch 模型可以在本地环境(windows,pycharm)上读取成功,但在服务器(unix)上失败,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
[我可以在本地(window,pycharm)上成功加载模型,但在服务器(unix)上失败,代码相同。][1]
TraceBACk (most recent call last):
file "inference.py",line 113,in <module>
main()
file "inference.py",line 82,in main
model.load_state_Dict(torch.load(config.ESIM_MODEL_PATH))
file "/home/ai-center/yangyitai/py38/lib/python3.8/site-packages/torch/@R_772_9464@lization.py",line 587,in load
with _open_zipfile_reader(opened_filE) as opened_zipfile:
file "/home/ai-center/yangyitai/py38/lib/python3.8/site-packages/torch/@R_772_9464@lization.py",@R_536_5450@2,in __init__
super(_open_zipfile_reader,self).__init__(torch._C.PyTorchfileReader(name_or_buffer))
RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader Failed reading zip archive: not a ZIP archive
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的pytorch 模型可以在本地环境(windows,pycharm)上读取成功,但在服务器(unix)上失败全部内容,希望文章能够帮你解决pytorch 模型可以在本地环境(windows,pycharm)上读取成功,但在服务器(unix)上失败所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。