- PyTorch官网:https://pytorch.org/get-started/locally/
使用Pip安装CUDA11.1版的PyTorch的命令如下:
pip3 install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
如果之前安装过CPU版本的,可以先卸载一下,卸载命令如下:
pip uninstall torch -y



