下载CUDA toolkit:
https://developer.nvidia.com/cuda-toolkit-archive
下载CUDNN:
https://developer.nvidia.com/rdp/cudnn-download
安装GPU版Pytorch
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
>>> import torch
>>> torch.cuda.is_available()
显示为True时表明安装成功