Aston Zhang, Zachary C. Lipton, Mu Li, Alexander J. Smola
Dive into Deep Learning
An interactive deep learning book with code, math and discussions — from tensors and linear models to transformers, diffusion models and reinforcement learning, with code in PyTorch, TensorFlow, JAX and MXNet.
Current edition of d2l.ai · CC BY-SA 4.0
Contents
Preface
Basics
Advanced
- Chapter 9Optimization Algorithms
- Chapter 10Attention
- Chapter 11Transformers
- Chapter 12State Space Models
- Chapter 13Computational Performance
- Chapter 14Reinforcement Learning
- Chapter 15Deep Reinforcement Learning
- 15.1Actor-Critic Methods and Multi-Step Returns
- 15.2Trust Regions and Proximal Policy Optimization
- 15.3KL-Regularized Policy Optimization
- 15.4Deep Q-Networks
- 15.5Soft Actor-Critic
- 15.6Learned Models and Planning
- 15.7Offline Reinforcement Learning
- 15.8Reinforcement Learning for Sequence Generation
- 15.9Further Reading
- Chapter 16Generative Adversarial Networks
- Chapter 17Diffusion Models
- 17.1Denoising and the Score
- 17.2Gaussian Paths: Diffusion and Flow Matching
- 17.3Sampling by Integration
- 17.4Diffusion for Images
- 17.5Samplers, Inversion and Editing
- 17.6Likelihood, Weighting and the Design Space
- 17.7Latent Diffusion and Transformers
- 17.8Few-Step Generation
- 17.9Discrete Diffusion
- 17.10Further Reading
Language Models
- Chapter 18Natural Language Processing: Pretraining
- 18.1Word Embedding (word2vec)
- 18.2Approximate Training
- 18.3The Dataset for Pretraining Word Embeddings
- 18.4Pretraining word2vec
- 18.5Word Embedding with Global Vectors (GloVe)
- 18.6Subword Embedding
- 18.7Word Similarity and Analogy
- 18.8Bidirectional Encoder Representations from Transformers (BERT)
- 18.9The Dataset for Pretraining BERT
- 18.10Pretraining BERT
- Chapter 19Natural Language Processing: Applications
- 19.1Sentiment Analysis and the Dataset
- 19.2Sentiment Analysis: Using Recurrent Neural Networks
- 19.3Sentiment Analysis: Using Convolutional Neural Networks
- 19.4Natural Language Inference and the Dataset
- 19.5Natural Language Inference: Using Attention
- 19.6Fine-Tuning BERT for Sequence-Level and Token-Level Applications
- 19.7Natural Language Inference: Fine-Tuning BERT
Image Models
- Chapter 20Computer Vision
- 20.1Image Augmentation
- 20.2Fine-Tuning
- 20.3Object Detection and Bounding Boxes
- 20.4Anchor Boxes
- 20.5Multiscale Object Detection
- 20.6The Object Detection Dataset
- 20.7Single Shot Multibox Detection
- 20.8Region-based CNNs (R-CNNs)
- 20.9Semantic Segmentation and the Dataset
- 20.10Transposed Convolution
- 20.11Fully Convolutional Networks
- 20.12Neural Style Transfer
- 20.13Image Classification (CIFAR-10) on Kaggle
- 20.14Dog Breed Identification (ImageNet Dogs) on Kaggle
Mathematics for Deep Learning
- Chapter 21Linear Algebra
- Chapter 22Calculus and Automatic Differentiation
- Chapter 23Optimization
- Chapter 24Probability and Statistical Learning
- 24.1Random Variables
- 24.2Joint Distributions and Transformations
- 24.3Distributions
- 24.4The Exponential Family
- 24.5Statistics
- 24.6Maximum Likelihood
- 24.7Latent Variables, EM, and the ELBO
- 24.8Bayesian Computation
- 24.9Concentration Inequalities
- 24.10Uniform Convergence and Generalization
- 24.11Naive Bayes
- 24.12Further Reading
- Chapter 25Information Theory and Divergences
- Chapter 26Dynamics: Differential Equations and Generative Flows
Tools for Deep Learning
Attic
- Chapter 28Gaussian Processes
- Chapter 29Hyperparameter Optimization
- Chapter 30Recommender Systems
- 30.1Overview of Recommender Systems
- 30.2The MovieLens Dataset
- 30.3Matrix Factorization
- 30.4AutoRec: Rating Prediction with Autoencoders
- 30.5Personalized Ranking for Recommender Systems
- 30.6Neural Collaborative Filtering for Personalized Ranking
- 30.7Sequence-Aware Recommender Systems
- 30.8Feature-Rich Recommender Systems
- 30.9Factorization Machines
- 30.10Deep Factorization Machines