当前位置:网站首页>RuntimeError: Attempting to deserialize object on CUDA device 1 but torch. cuda. device_ count() is 1.
RuntimeError: Attempting to deserialize object on CUDA device 1 but torch. cuda. device_ count() is 1.
2022-06-10 20:35:00 【Salted fish lying flat occasionally】
Successfully solved
RuntimeError: Attempting to deserialize object on CUDA device 1 but torch.cuda.device_count() is 1.
Wrong content
The program reports an error at this step
checkpoint = torch.load(‘model5_4.pt’)
The above problem description means that we have not obtained the information about cuda, Because my model runs on the server , The environment is different after downloading to the local .
resolvent
If you are currently only CPU Running in the environment , Need to add map_location=torch.device(‘cpu’).
If you currently have CUDA Running in the environment , Need to add map_location=torch.device(‘cuda’).
checkpoint = torch.load(‘model5_4.pt’)
Replace with :
checkpoint = torch.load('model5_4.pt',map_location='cuda')
The successful running ! It's wrong not to report !
边栏推荐
- Enhance the target method with surround notifications - extract notes
- PDU session flow
- Rotated sorted array
- 4.35v lithium battery charging IC
- hidden danger? Limited meaning? Can't stop the real cooking Mini kitchenware hot 618
- HM3416H降压IC芯片PWM/PFM 控制 DC-DC 降压转换器
- Recent work
- Fs4100 lithium battery charging management IC input 12V to 8.4v charging IC
- 高通 QC2.0 快速充电智能识别IC FP6719
- 4.35V锂电充电IC
猜你喜欢

获取列表中最大最小值的前n个数值的位置索引的四种方法

First batch! Sinomenine has passed CWPP capability assessment and inspection of Xintong Institute

Microsoft Word 教程「5」,如何在 Word 中更改頁邊距、創建新聞稿欄?

Redis集群形式--哨兵模式集群和高可用模式集群---Redis学习笔记003

Rotated sorted array

【录入课本latex记录】

软件定义边界(SDP)

CVPR 2022丨清华大学提出:无监督域泛化 (UDG)

中国工科研究生200多篇英文论文中最常见的习惯(The Most Common Habits from more than 200 English Papers written by Gradua)

暗黑破坏神不朽数据库怎么用 暗黑破坏神手游不朽数据库使用方法
随机推荐
Basic instructions for ads and AXD
Cloud native community boss blog
Change the root
安全隐患?意义有限?挡不住真煮迷你厨具火爆618
Mobile power supply scheme for outdoor solar camping lamp
监控易打造“准生态”格局,赋能信创“平替”
"Bug" problem analysisruntimeerror:which is output 0 of resubackward0
Recording a super Oolong mental retardation bug may help people like me eat for free
8.4v dual lithium battery professional charging IC (fs4062a)
获取列表中最大最小值的前n个数值的位置索引的四种方法
The most common habits from more than 200 English papers written by gradua
PDU会话流程
Standing at such a time node today, we may have a clearer understanding of the industrial Internet
Analysis on rendering principle of mobile terminal
国家先进计算产业创新(宜昌)中心正式落地 中科曙光、升哲科技联合运营
软件定义边界(SDP)
Is it safe to open a futures account online? How to avoid being cheated?
KP522201A采用 SOT23-6 封装的 4.5V 至 17V 输入、2A 输出、600kHz 同步降压转换器
移动端渲染原理浅析
MySQL ---- 常用函数