PyTorch
is an open source machine learning framework,it is an optimized tensor library for deep learning
using GPUs and CPUs. This tutorials covers steps required to install PyTorch
on windows, Linux and Mac with
conda
.
Create virtual environment pytorch_venv
with Python (this post is written with Python 3.7), using anaconda command prompt
conda create --name pytorch_venv python=3.7
conda activate pytorch_venv
Install PyTorch
on Windows for
NON-CUDA
devices(CPU)
conda install pytorch torchvision torchaudio cpuonly -c pytorch
Install PyTorch
on Windows for
CUDA 10.2
devices
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Install PyTorch
on Windows for
CUDA 11.3
devices
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
Install PyTorch
on Linux for
NON-CUDA
devices(CPU)
conda install pytorch torchvision torchaudio cpuonly -c pytorch
Install PyTorch
on Linux for
CUDA 10.2
devices
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Install PyTorch
on Linux for
CUDA 11.3
devices
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
Install PyTorch
on Mac for
NON-CUDA
devices(CPU)
conda install pytorch torchvision torchaudio -c pytorch
import torch
print(torch.__version__)
Categories: PyTorch
Similar Articles