2  Preface

We are writing this book for students taking our bachelor’s course in deep learning. It accompanies the work we do together during the semester.

The course grew out of teaching with Dive into Deep Learning. In developing these materials, we want to preserve the connection between mathematical ideas and working code while making room for topics such as attention, pretrained models and generative learning. We begin with linear models because they give us a manageable setting in which to understand the decisions that recur throughout the course: how to represent a problem, define a loss, update parameters and evaluate a result. We are redesigning the course because the growing role of pretrained models has changed what students need to understand and practise. At the same time, the availability of AI tools gives us a reason to rethink our teaching: how can we use them to help you work through difficult ideas while developing your own judgment?

Our aim is for you to become comfortable asking why a model works—and investigating when it does not. A successful training run is a starting point. You should also be able to explain what the model learned from, what its predictions mean and whether the experiment supports your conclusions.

You will probably find some parts of the course easier than others. Experience with programming does not automatically make the mathematics familiar, and understanding a derivation does not make its implementation straightforward. When you get stuck, try to identify the particular step that is unclear: a symbol, a tensor operation, an assumption or an unexpected result. Bring those questions to the sessions. They help us see what needs a better explanation.

AI tools are part of how we will work in this course. They can help you explore an idea, find a programming error or practise an explanation. Treat their suggestions as things to investigate. Check the reasoning, inspect the code and ask whether you can explain the result yourself.

As the book develops, we welcome reports of errors and passages that are difficult to follow. If an explanation leaves you guessing about an essential step, we want to know.