配置win10下pytorch GPU版本
1.创建一个py3.7的虚拟环境
2.到官网https://pytorch.org/get-started/locally/
查看安装教程
提取设置好代理后,用下面的指令安装最新版。
pip install torch===1.7.0+cu110 torchvision===0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
安装后可能会出现
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
只需要把版本降低到install numpy==1.19.3
将numpy降到1.9.3版本即可解决问题。
查看是否安装成功
import torch
flag=torch.cuda.is_available()
print(flag)
安装成功GPU版本后输出成功。