Pytorch和Torchvision编译为不同的CUDA版本

Pytorch和Torchvision编译为不同的CUDA版本,pytorch,torchvision,Pytorch,Torchvision,我试图在我的Google Colab上运行YOLACT,发现了这个错误。有人能帮助解决这个问题吗?您需要将您的torchvision升级到使用CUDA 10.2编译的版本: RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=10.2 and torchvision has CUDA Version=10.1

我试图在我的Google Colab上运行YOLACT,发现了这个错误。有人能帮助解决这个问题吗?

您需要将您的
torchvision
升级到使用CUDA 10.2编译的版本:

RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=10.2 and torchvision has CUDA Version=10.1. Please reinstall the torchvision that matches your PyTorch install.
或者,如果您正在使用Conda:

pip install --upgrade torchvision>=0.6.0
根据您的PyTorch检查您应该安装的版本

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch