This is an archived version of the course. Please find the latest version of the course on the main webpage.

Chapter 1: Introduction

Introduction and Plan

face Luca Grillotti

This lesson aims at answering the following question:

How to write a Deep Learning model using PyTorch?

Why PyTorch and not another library?

As you probably know, there are plenty of other Machine Learning/Deep Learning libraries, the most popular one being: TensorFlow.

We chose to focus on PyTorch for the following reasons:

  • Implementations relying on PyTorch tend to be more pythoning and easier to read & manipulate.
  • All other Deep Learning-related courses provided in the Department of Computing use PyTorch.
  • PyTorch is the most popular Deep Learning library in research…
  • … and it is also widely used in industry! (but less than TensorFlow)

Why this lesson?

You can find dozens of Deep Learning and PyTorch tutorials online. So why did we choose to write another one?

The issue is that (in our opinion) most of the tutorials available online tend to introduce too much content at the same time.

On our side, we wanted to explain

  1. how PyTorch works internally (it is important to know how something works before using it), and
  2. provide a step-by-step guide of how to build a model.

Plan

Chapter 2 starts with a brief introduction to Gradient Descent: a first-order optimisation technique for minimising a function.

In chapter 3, we see how to play with PyTorch tensors.

In chapter 4, we see how to perform Gradient Descent automatically using PyTorch.

In chapter 5, we apply that Automatic Gradient Descent approach to a simple linear regression task.

In chapter 6, we provide a quick introduction to Deep Learning.

In chapter 7, we put all the content of the previous chapters into practice, to build an image classifier.

Chapter 8 is also practice-oriented, but instead of a classifier, we implement an auto-encoder.