Skip to content

Guide · Open source

How to use pytorch-deep-learning: course setup and learning path

Updated · written with AI from the project's own documentation and checked against our catalogue data

pytorch-deep-learning is the GitHub repository behind the Zero to Mastery Learn PyTorch for Deep Learning course. It holds the code notebooks, slides and exercises for a beginner-friendly, hands-on path through PyTorch. This guide shows you how to get the materials, what you need before starting, and how the course is organised so you can work through it from the first notebook to a deployed model.

Learn PyTorch for Deep Learningmrdbourke/pytorch-deep-learning · ★ 19.3k · MIT

Quick start

  1. 1Check your prerequisites. Confirm you have roughly 3-6 months of Python experience and can use Jupyter Notebook or Google Colab.
  2. 2Clone the repository. Run git clone https://github.com/mrdbourke/pytorch-deep-learning in a terminal to download the materials.
  3. 3Open the first notebook. Start with section 00, PyTorch Fundamentals, in Jupyter Notebook or Google Colab.
  4. 4Do the exercises. Complete the exercises and extra-curriculum listed at the end of each section before moving on.
  5. 5Use the online book for reading. Read the matching chapter at learnpytorch.io alongside the notebook if you want written explanations.
  6. 6Finish with deployment. Work through section 09 to take a PyTorch model and deploy it, the course's final milestone project.

Check whether this course suits you

The course is aimed at beginners in machine learning who want to learn PyTorch in a code-first way. The README asks for 3-6 months of coding Python and some familiarity with Jupyter Notebooks or Google Colab, though the course says you can pick up notebooks as you go.

The README also says that if you already have a year or more of machine learning experience, the course may offer little new material.

  • Good fit: beginners in ML, Python programmers new to deep learning, people who prefer notebooks and exercises.
  • Poor fit: experienced ML practitioners, people who need a framework other than PyTorch, and anyone who wants a library to install into a product.

Get the course materials onto your computer

The repository is installed by cloning it. Run the clone command below in a terminal, then open the notebooks in Jupyter Notebook or Google Colab.

git clone https://github.com/mrdbourke/pytorch-deep-learning

Choose where to read and run the course

You can follow the course in three places. The full course is available as a readable online book at learnpytorch.io. The first five sections are also on YouTube, covering the first 25 hours of material. The repository contains the notebooks, slides and exercises themselves.

Questions can be asked on the GitHub Discussions page for the repository.

  • Online book: learnpytorch.io
  • YouTube: first five sections of the course
  • Repository: notebooks, slides and exercises
  • Questions: GitHub Discussions

Work through the sections in order

The course is numbered 00 to 09 and each section builds on the previous one. Section 00 covers PyTorch fundamentals and section 01 outlines a PyTorch workflow. Sections 02 and 03 apply that workflow to classification and computer vision, and section 04 covers custom datasets. Section 05 turns your code into Python scripts, which the course notes is how PyTorch code is often found in the wild.

Sections 06 to 09 cover transfer learning, experiment tracking, paper replicating and model deployment. Each section has its own exercises and extra-curriculum, and a slides PDF in the repository.

  • 00 - PyTorch Fundamentals
  • 01 - PyTorch Workflow
  • 02 - PyTorch Neural Network Classification
  • 03 - PyTorch Computer Vision
  • 04 - PyTorch Custom Datasets
  • 05 - PyTorch Going Modular
  • 06 - PyTorch Transfer Learning
  • 07 - Milestone Project 1: Experiment Tracking
  • 08 - Milestone Project 2: Paper Replicating
  • 09 - Milestone Project 3: Model Deployment

Use the extra resources and cheatsheet

The course includes a PyTorch cheatsheet with a quick overview of main features, plus a page of recommended books and resources covering PyTorch, ML engineering, NLP, time series and datasets. A quick PyTorch 2.0 tutorial is also included, and the README notes that earlier course materials still work with PyTorch 2.0.

What people use it for

  • Learning PyTorch basics from tensors and operations in section 00
  • Building a neural network classifier and a computer vision model using the same workflow
  • Adapting a pre-trained model to your own image problem with transfer learning
  • Turning notebook code into Python scripts with the modular approach in section 05
  • Replicating a machine learning paper as a practice project in section 08

Frequently asked questions

Is pytorch-deep-learning free?

The README says all of the course materials are available for free. The repository is MIT licensed, which the project page lists as its licence.

What do I need before starting pytorch-deep-learning?

The README suggests 3-6 months of coding Python, some experience with Jupyter Notebook or Google Colab, and at least one beginner machine learning course, though the course notes this can sometimes be skipped. A willingness to learn is listed as the most important requirement.

How do I install pytorch-deep-learning?

Run git clone https://github.com/mrdbourke/pytorch-deep-learning to download the repository, then open its notebooks in Jupyter Notebook or Google Colab. The repository is teaching material, not a package you install into a project.

Can I learn PyTorch from this course without prior machine learning experience?

Yes, the course is designed for beginners in machine learning and deep learning. It teaches many ML concepts hands-on as it goes, although the README recommends a beginner ML course for background.

Is there an alternative to pytorch-deep-learning?

The README-linked comparable projects are the official PyTorch tutorials and the fast.ai Practical Deep Learning for Coders course. The PyTorch documentation is also mentioned in the README as a top resource.

Does the course cover frameworks other than PyTorch?

No. The course focuses only on PyTorch, so if you need another framework you will need a different resource.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use pytorch-deep-learning if you are a beginner or a Python programmer new to deep learning and want a structured, notebook-based path to PyTorch and a deployed model. Pick something else if you are an experienced ML practitioner, need a non-PyTorch framework, or want a library to ship in a product.

Install options & downloads