美文网首页
Pytorch错误:Torch not compiled wit

Pytorch错误:Torch not compiled wit

作者: LONG_7 | 来源:发表于2021-11-24 15:50 被阅读0次
  • Pytorch错误:Torch not compiled with CUDA enabled

  • 解读:当前版本Pytorch不能驱动CUDA,版本不匹配

  • 命令行输入python启动Python,输入如下代码证明Pytorch版本与CUDA版本不匹配,且不能调用:

import torch
print(torch.__version__)   #显示Pytorch版本
print(torch.cuda.is_available()) #返回False为版本不匹配,报该错误;返回Ture,解决问题
  • 解决问题:安装匹配的Torch版本,建议清华源下载然后离线安装,速度快效果好!
  • 建议:自己电脑建议更改Pytorch支持更好的CUDA版本,如CUDA9.0、CUDA10.0等,省太多事儿啦!忙活起来!

相关文章

网友评论

      本文标题:Pytorch错误:Torch not compiled wit

      本文链接:https://www.haomeiwen.com/subject/mhgntrtx.html