报错如下:
GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
RuntimeError: CUDA error: no kernel image is available for execution on the device
很奇怪的问题,单独安装torch和torchvision会出问题,必须使用pip install torch==1.7.0+cu110 torchvision==0.8.0+cu110 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
这种命令安装。
安装完后在虚拟环境下使用pip list命令查看安装的torch版本是这样的: