Skip to content

Chapter 4 of Foundations

Deep learning essentials with PyTorch soon

Tensors, automatic differentiation and the training loop, built up from the gradient descent you wrote in Chapter 2, then multilayer perceptrons on tabular scientific data.

soon This chapter is planned and not yet written. The outline below is the current plan; it may change.

What it will cover

  • Tensors, devices and broadcasting in PyTorch
  • Autograd: what loss.backward() computes
  • Writing a training loop by hand: forward, loss, backward, step
  • Multilayer perceptrons, activation functions and initialisation
  • Regularisation for neural networks: early stopping, dropout, weight decay
  • Lab 4: an MLP for solubility, compared honestly with ridge regression

Planned learning outcomes

  1. Implement and train a small neural network in PyTorch with an explicit training loop.
  2. Diagnose training problems from loss curves (divergence, plateaus, overfitting).
  3. Compare a neural network against a strong classical baseline using the evaluation habits of Chapter 2.

In the meantime

Chapters 0, 1 and 2 are complete and are the prerequisites for this chapter.