Skip to content

Installation - PyTorch Beginner 01

New Tutorial series about PyTorch! Learn all the basics you need to get started with this deep learning framework! Part 1


New Tutorial series about PyTorch! Learn all the basics you need to get started with this deep learning framework! In this first part I show you how I install PyTorch on my Mac using Anaconda. Installation on Linux or Windows can be done almost the same way.

All code from this course can be found on GitHub.

Go to https://pytorch.org/get-started/locally/

select OS: Mac
select Package: conda
select Python 3.7

if Linux or Windows and want GPU support
--> >select Cuda version 10.1

Install Cuda Toolkit (If you want GPU support)

Development environment for creating high performance GPU-accelerated applications You need an NVIDIA GPU in your machine:

https://developer.nvidia.com/cuda-downloads

Legacy releases
10.1 update 2
--> select OS (e.g. Windows 10)
--> Download and install

Create conda environment and activate it

conda create -n pytorch python=3.7
conda activate pytorch

Install pytorch

conda install pytorch torchvision -c pytorch
or with GPU
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

Verification

import torch
x = torch.rand(5, 3)
print(x)

torch.cuda.is_available()

FREE VS Code / PyCharm Extensions I Use

鉁 Write cleaner code with Sourcery, instant refactoring suggestions: Link*

* This is an affiliate link. By clicking on it you will not have any additional costs. Instead, you will support my project. Thank you! 馃檹