PyTorch 安装

2017-04-25  本文已影响0人  sixfold_yuan

什么是PyTorch?

PyTorch是基于Python的科学计算包,主要有两个功能:

Pytorch官网
PyTorch支持Linux,OSX和Windows系统

PyTorch 0.4.0 迁移指南

2018年4月26日更新 v0.4.0

Linux Python 2.7 CPU版 pip安装

pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp27-cp27mu-linux_x86_64.whl
pip install torchvision 

# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp27-cp27m-linux_x86_64.whl

Linux Python 2.7 GPU版 CUDA9.0 pip安装

pip install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp27-cp27mu-linux_x86_64.whl
pip install torchvision

# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp27-cp27m-linux_x86_64.whl

Windows Python 3.6 CPU版 pip安装

pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl
pip3 install torchvision

Windows Python 3.6 GPU版 CUDA9.0 pip安装

pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp36-cp36m-win_amd64.whl
pip3 install torchvision
上一篇 下一篇

猜你喜欢

热点阅读