Tensorflow Can';不要将GPU与Pytorch一起使用

Tensorflow Can';不要将GPU与Pytorch一起使用,tensorflow,machine-learning,anaconda,artificial-intelligence,pytorch,Tensorflow,Machine Learning,Anaconda,Artificial Intelligence,Pytorch,在尝试使用Pytorch时,我一直遇到这个错误 RuntimeError:试图反序列化CUDA设备上的对象,但torch.CUDA.is\u available()为False。如果您在仅CPU的计算机上运行,请使用torch.load with map_location=torch.device(“CPU”)将存储映射到CPU 我使用conda install Pytorch torchvision cudatoolkit=10.1-c Pytorch安装了Pytorch 使用tensorfl

在尝试使用Pytorch时,我一直遇到这个错误

RuntimeError:试图反序列化CUDA设备上的对象,但torch.CUDA.is\u available()为False。如果您在仅CPU的计算机上运行,请使用torch.load with map_location=torch.device(“CPU”)将存储映射到CPU

我使用conda install Pytorch torchvision cudatoolkit=10.1-c Pytorch安装了Pytorch


使用tensorflow,我的GPU运行正常。

您可以通过安装CUDA 10.2(最新版本)来修复此错误,并使用以下命令重新安装Pytorch:

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

使用
pytorch.org

pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
对于Windows+GPU(其他请查看
pytorch.org


可能会给你一个想法。你的nvidia驱动程序的版本是什么?你的CUDA版本是什么?要进行检查,可以在终端中键入
nvidia smi
。@xenotecc pytorch不使用系统cuda。它安装了自己的本地版本。如果您是正确的。对不起,打扰了。