Library · CC BY-SA 4.0

Dive intoDeep Learning

Dive into Deep Learning

Cover illustration of the book

Choose your version

The same text, told at every level, in every language and look shown here. Pick, then listen or download.

Listen and watch

The same player the product gives for your own book: the voice, the drawings as they are drawn, the text.

The open textbook used in hundreds of university courses on neural networks. Its first chapter explains what it means for a program to learn from data: models, losses, optimisation, the kinds of learning problems, and how deep learning came to win.

This is a sample: 1 of 23 chapters.

From the lectures

A sound wave with sample dots, the label 44,000 samples per second, and an arrow to a yes or no box with a question mark asking for the rule.
A Motivating Example

Raw audio to yes or no

Imagine just writing a program to respond to a wake word such as "Alexa", "OK Google", and "Hey Siri". Try coding it up in a room by yourself with nothing but a computer and a code editor, as illustrated in the figure. How would you write such a program from first principles?

A graph of performance against amount of data: a traditional method flattens early, a deep model starts lower and keeps rising past it; then a bin labelled garbage in with an arrow to garbage out.
Key Components

More data, bigger models

Generally, the more data we have, the easier our job becomes. When we have more data, we can train more powerful models and rely less heavily on preconceived assumptions. The regime change from (comparatively) small to big data is a major contributor to the success of modern deep learning.

Labelled examples flow into a supervised learning algorithm, which outputs a learned model; a new input goes into the model and a prediction comes out.
Optimization Algorithms and Supervised Learning

From labelled data to a model

Informally, the learning process looks something like the following. First, grab a big collection of examples for which the features are known and select from them a random subset, acquiring the ground truth labels for each.

Two users, a science-fiction fan and a comedy fan, each with a different list of recommended films; a star rating and a skip button as kinds of feedback.
Tagging, Search and Recommender Systems

Same shop, different users

Recommender systems are another problem setting that is related to search and ranking. The problems are similar insofar as the goal is to display a set of items relevant to the user. The main difference is the emphasis on personalization to specific users in the context of recommender systems.

An agent box and an environment box in a loop: action goes from agent to environment, observation and reward come back; the agent's rule is the policy.
Interacting with an Environment and Reinforcement Learning

The reinforcement learning loop

Next, we briefly describe reinforcement learning, a rich framework for posing learning problems in which an agent interacts with an environment.

A grid of small GPU boxes with 32 images each, and the sum 1,024 × 32 ≈ 32,000 images per step; training time falls from days to minutes.
The Road to Deep Learning

Many GPUs, one big batch

In many cases, a single GPU is insufficient for processing the large amounts of data available for training. Over the past decade the ability to build parallel and distributed training algorithms has improved significantly.

How it was made

Examples for: a curious adult with school maths who uses ChatGPT and phone apps; add one modern instance per idea, such as a chatbot, a spam filter, a recommendation feed or a voice assistant

The source

The lectures retell the English text of d2l.ai (Cambridge University Press, 2023), GitHub d2l-ai/d2l-en by Aston Zhang, Zachary C. Lipton, Mu Li, Alexander J. Smola, published under an open licence that allows retelling and translation. The retelling, the drawings and the voice are made by AI and checked against the book by a second model. How AI is used.

The lectures adapt the original and are released under the same licence, free to share and adapt with credit to the author and a link to this page: CC BY-SA 4.0

Your own hard book, the same way

Upload a textbook or any difficult book. The first five minutes are free.

Upload a book