網站首頁 編程語言 正文
【debug】PytorchStreamReader failed reading zip archive: failed finding central directory
作者:cxxx17 更新時間: 2022-04-12 編程語言libtorch(版本1.7)讀取pytorch(版本1.4)中存的tensor時,報錯PytorchStreamReader failed reading zip archive: failed finding central directory
save的代碼:
torch.save(cur_tensor, "cur_tensor.pt")
嘗試了網上的方法:
torch.save(cur_tensor, "cur_tensor.pt", _use_new_zipfile_serialization=False)
# or torch.save(cur_tensor, "cur_tensor.pt", _use_new_zipfile_serialization=True)
還是會報錯。
嘗試將pytorch版本也換成1.7,并且用
torch.save(cur_tensor, "cur_tensor.pt", _use_new_zipfile_serialization=True)
保存,libtorch可以正常讀取了
原文鏈接:https://blog.csdn.net/weixin_42262721/article/details/121403687
相關推薦
- 2022-07-31 python虛擬機解釋器及運行過程_python
- 2022-11-28 基于Python實現DIT-FFT算法_python
- 2022-11-17 Python?pyecharts模塊安裝與入門教程_python
- 2022-10-17 一文教會你用nginx+uwsgi部署自己的django項目_python
- 2022-08-20 python操作csv格式文件之csv.DictReader()方法_python
- 2022-09-08 Python報錯SyntaxError:unexpected?EOF?while?parsing的解
- 2022-12-16 使用Python?文件讀取的多種方式(四種方式)_python
- 2022-03-19 .NET6使WebApi獲取訪問者IP地址_基礎應用
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細win安裝深度學習環(huán)境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發(fā)現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態(tài)字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支