Pytorch and Torchvision are compiled different CUDA versions

Viewed 5673
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.

I am trying to run YOLACT on my Google Colab and found this error. Can someone help solve this issue?

1 Answers

You need to upgrade your torchvision to one compiled with CUDA 10.2:

pip install --upgrade torchvision>=0.6.0

or, if you're using Conda:

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

Check here the version you should install based on your PyTorch.

Related