JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

RuntimeError: Attempting to deserialize object on CUDA device 1 but torch.cuda.device_count() is 1.

发布时间 2023-10-16 14:57:08作者: Liang-ml

问题:服务器上多块卡,使用其中一张训练的模型,在本地预测的时候报错。

解决:在torch.load中加入map_location,指定一块卡

 

    本栏目推荐文章
  • CVE-2023-34050 Spring AMQP Deserialization Vulnerability
  • redis报错MISCONF Errors writing to the AOF file: No space left on device,磁盘满无法写入数据报错
  • device: 设备模拟 -- (电脑->手机)
  • 报错 To run and debug the Harmony device, configure the HarmonyOS runtime.
  • pytorch反向传播错误解决:RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time.
  • LVM-相关命令报错-Devices file PVID xxxxxxxxx last seen on /dev/xvda4 not found
  • device-autojs
  • 幽灵和熔断+LR/SC的实现和使用+Consistent和Coherent+memory 属性 Device-nGnRnE+IP-XACT+vcs token is "until"+vcs编译解决 module名重复的冲突问题+Webhook
  • chrome://inspect/#devices调试方法及页面白屏解决
  • Json.Net Deserialize a Collection from BSON
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们