CUDA和Torch版本不兼容

查看自己的cuda版本

或者

nvcc --version

输入以下命令查看torch版本

import torch
print(torch.__version__)

或者输入以下命令查看

import torch
print(torch.cuda.is_available())

如果返回False那么只需要卸载原来的PyTorch,然后安装与CUDA匹配的版本

PyTorch

猜你喜欢

转载自blog.csdn.net/m0_67843890/article/details/137833138