根据自己的cuda版本,选择pytorch,当然也可以反着选择。
一,登录官网
https://pytorch.org
二,我的cuda版本是9.0,支持9.0最新的pytorch为1.1.0版本
可以使用conda安装,缺点速度慢,受网速限制。
# CUDA 9.0
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
三,下载whl,本地安装。
1.复制下面的网址
2.根据自己的python版本,系统版本,选择下载对应的whl,使用pip安装。