One module per chapter of Bishop and Bishop, Deep Learning: Foundations and Concepts (2024), with one function per figure, linked to the lecture notes. The code is written for this course with numpy, matplotlib and PyTorch, and every model is small enough to train on an ordinary CPU.
python3 ch06_deep_neural_networks.py, list its figures with --list, make one with --fig 6.4, or run every chapter with python3 make_all.py.Each figure is written to img/chNN/ as PNG, SVG and PDF. MNIST is downloaded once into a local cache, and trained models are cached so reruns are quick. Shared helpers are in common.py; the driver is make_all.py.
Module: ch01_deep_learning_revolution.py · Notes: The Deep Learning Revolution
Module: ch02_probabilities.py · Notes: Probabilities
Module: ch03_standard_distributions.py · Notes: Standard Distributions
Module: ch04_single_layer_regression.py · Notes: Single-layer Networks: Regression
Module: ch05_single_layer_classification.py · Notes: Single-layer Networks: Classification
Module: ch06_deep_neural_networks.py · Notes: Deep Neural Networks
Module: ch07_gradient_descent.py · Notes: Gradient Descent
Module: ch08_backpropagation.py · Notes: Backpropagation
Module: ch09_regularization.py · Notes: Regularization
Module: ch10_convolutional_networks.py · Notes: Convolutional Networks
Module: ch11_structured_distributions.py · Notes: Structured Distributions
Module: ch12_transformers.py · Notes: Transformers
Module: ch13_graph_neural_networks.py · Notes: Graph Neural Networks
Module: ch14_sampling.py · Notes: Sampling
Module: ch15_discrete_latent_variables.py · Notes: Discrete Latent Variables
Module: ch16_continuous_latent_variables.py · Notes: Continuous Latent Variables
Module: ch17_generative_adversarial_networks.py · Notes: Generative Adversarial Networks
Module: ch18_normalizing_flows.py · Notes: Normalizing Flows
Module: ch19_autoencoders.py · Notes: Autoencoders
Module: ch20_diffusion_models.py · Notes: Diffusion Models
Module: appendices.py · Notes: Mathematical appendices