安装pytorch官网

13 篇文章 0 订阅

老版本:

https://pytorch.org/get-started/previous-versions/

最新版本:

https://pytorch.org/

 conda install pytorch-cpu=0.4.1 torchvision-cpu -c pytorch  无gpu版本安装,指定版本号
torchvision

 

INSTALLING PREVIOUS VERSIONS OF PYTORCH

We’d prefer you install the latest version, but old binaries and installation instructions are provided below for your convenience.

Via conda

This should be used for most previous macOS version installs.

To install a previous version of PyTorch via Anaconda or Miniconda, replace “0.4.1” in the following commands with the desired version (i.e., “0.2.0”).

Installing with CUDA 9

conda install pytorch=0.4.1 cuda90 -c pytorch

or

conda install pytorch=0.4.1 cuda92 -c pytorch

Installing with CUDA 8

conda install pytorch=0.4.1 cuda80 -c pytorch

Installing with CUDA 7.5

conda install pytorch=0.4.1 cuda75 -c pytorch

Installing without CUDA

conda install pytorch=0.4.1 -c pytorch

From source

It is possible to checkout an older version of PyTorch and build it. You can list tags in PyTorch git repository with git tag and checkout a particular one (replace ‘0.1.9’ with the desired version) with

git checkout v0.1.9

Follow the install from source instructions in the README.md of the PyTorch checkout.

Via pip

Download the whl file with the desired version from the list below, and run

pip install /path/to/whl/file

You can also directly pass a URL to pip:

pip install https://download.pytorch.org/whl/cu80/torch-0.4.1-cp36-cp36m-linux_x86_64.whl

If you want no CUDA support, the URL would be something like https://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl

There are seven major lists below: Linux binaries compiled with CUDA 9.2, 9.1, 9.0, 8 and 7.5 support, Windows support, and Mac OSX & miscellaneous other binaries.

PyTorch Linux binaries compiled with CUDA 9.2

PyTorch Linux binaries compiled with CUDA 9.1

PyTorch Linux binaries compiled with CUDA 9.0

PyTorch Linux binaries compiled with CUDA 8

PyTorch Linux binaries compiled with CUDA 7.5

Linux No CUDA binaries

Windows binaries

Mac and misc. binaries

For recent macOS binaries, use conda:

e.g.,

conda install pytorch=0.4.1 cuda90 -c pytorch conda install pytorch=0.4.1 cuda92 -c pytorch conda install pytorch=0.4.1 cuda80 -c pytorch conda install pytorch=0.4.1 -c pytorch # No CUDA

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值