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

Pytorch错误:Torch not compiled wit

作者: 向着光噜噜 | 来源:发表于2021-04-12 10:33 被阅读0次

先测试:

import torch

print(torch.__version__)

print(torch.cuda.is_available())

如果输出的结果是False,那么说明当前的Pytorch版本无法使用显卡。

解决办法:

(1)如果有显卡资源并需要使用显卡资源,先检查一下当前的CUDA版本,在终端中输入

cat /usr/local/cuda/version.txt

(2)然后根据自己的CUDA版本在Pytorch官网查看并安装可用的版本,参考链接如下:

CUDA 10.2

https://download.pytorch.org/whl/cu102/torch_stable.html

CUDA 10.1

https://download.pytorch.org/whl/cu101/torch_stable.html

CUDA 10.0

https://download.pytorch.org/whl/cu100/torch_stable.html

CUDA 9.0

https://download.pytorch.org/whl/cu90/torch_stable.html

CPU及所有CUDA版本

https://download.pytorch.org/whl/torch_stable.html

相关文章

网友评论

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

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