pytorch指定版本安装及查看版本

  • pytorch官网
https://pytorch.org/
  • pytorch旧版本网址
https://pytorch.org/previous-versions/
  • pytorch从链接安装指定版本
pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl
注:上述版本为cuda 8.0,python 2.7,torch 0.2.0版本
  • torchvision安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torchvision
  • 验证
import torch
import torchvision
print(torch.cuda.is_available())
  • pytorch版本查看
import torch
print(torch.__version__)

猜你喜欢

转载自blog.csdn.net/u013187057/article/details/81484857