当前位置:   article > 正文

2024 安装pytorch_安装pytorch1.0

安装pytorch1.0

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.

COMMANDS FOR VERSIONS >= 1.0.0

v2.2.0

Conda
OSX
  1. # conda
  2. conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 -c pytorch
Linux and Windows
  1. # CUDA 11.8
  2. conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=11.8 -c pytorch -c nvidia
  3. # CUDA 12.1
  4. conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=12.1 -c pytorch -c nvidia
  5. # CPU Only
  6. conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 cpuonly -c pytorch
Wheel
OSX
pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0
Linux and Windows
  1. # ROCM 5.6 (Linux only)
  2. pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/rocm5.6
  3. # CUDA 11.8
  4. pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu118
  5. # CUDA 12.1
  6. pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121
  7. # CPU only
  8. pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cpu

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号