free to read · 752 pages
The Why Book of Deep LearningPart 1
by Dr. Philemon Paul Daniel
Why every piece of a neural network is there, with Keras notebooks for every lesson and almost no maths. Written for engineering students and working professionals, as the grown-up sequel to the AI Kids Guru deep-learning video course.
Chapters
Click a chapter to open it as a book you can flip through. The chips under a chapter open its notebooks in Google Colab, free, with nothing to install.
- ·Cover, how to use this book, contents5 pages
- Part I · The Learning Machine
- 1What Learning Really Ispp. 3–24Run it:LabCh01_What_Learning_Is
- 2Tensors and Shapes: The Grammar of Deep Learningpp. 25–44
- 3One Neuronpp. 45–64Run it:Lab01_2026_stepwise
- 4Stacking Neurons: Dense Layers and the MLPpp. 65–84
- Part II · Making It Learn
- 5Activation Functions: Every One, and Whenpp. 87–118
- 6Loss Functions: Every One, and Whenpp. 119–152
- 7Backpropagation by Handpp. 153–174
- 8Optimizers and the Learning Ratepp. 175–198
- 9Vanishing and Exploding Gradientspp. 199–220
- 10Normalization Layerspp. 221–240
- 11Overfitting and Regularizationpp. 241–262Run it:KidsLab04_Fashion_MNIST_CNN
- 12The Training Cockpit: Curves, Metrics and Debuggingpp. 263–286
- Part III · Seeing
- 13Convolution: One Small Windowpp. 289–308
- 14Shapes, Channels and Parameterspp. 309–324
- 15The Conv Toolbox: Pooling, Stride, Receptive Field and Friendspp. 325–346
- 16Building Real CNNs: Fashion-MNIST and CIFAR-10pp. 347–370
- 17Famous Architectures and the Skip Connectionpp. 371–392
- Part IV · Meaning and Memory
- 18Embeddings: Turning Things into Vectorspp. 395–420
- 19Recurrent Networkspp. 421–444Run it:Lab08_RNN_Number_Prediction
- 20LSTM and GRUpp. 445–466
- 21Sequence to Sequence and the Bottleneckpp. 467–488Run it:Lab10_LSTM
- Part V · Attending
- 22Attentionpp. 491–512Run it:LabCh22_Attention_By_Hand
- 23The Transformer Blockpp. 513–534Run it:LabCh23_Transformer_Block
- 24Feed-Forward (MLP) Layers: The Quiet Half of Every Modelpp. 535–554Run it:LabCh24_FeedForward_Layers
- 25Linear Attention and Other Ways to Beat n²pp. 555–576Run it:LabCh25_Linear_Attention
- 26State-Space Models: From Kalman to Mambapp. 577–598Run it:LabCh26_State_Space_Models
- Part VI · Imagining
- 27Autoencoderspp. 601–620Run it:LabCh27_Autoencoders
- 28Variational Autoencoderspp. 621–642
- 29The Generative Family: GANs, Diffusion and Friendspp. 643–666Run it:LabCh29_Generative_Models
- Part VII · The Craft
- 30The Keras Field Guidepp. 669–696
- 31Choosing an Architecturepp. 697–720
- 32The Big Cheat Sheetspp. 721–747
The notebooks
Every lesson that can be run has a Keras notebook: checked, run from top to bottom and saved with its outputs, so you can read the results before you run anything. They live in github.com/phildani7/why-book-of-deep-learning-part-1, each named after its main chapter. Tested with TensorFlow 2.21 and Keras 3.14.
| Ch. | Notebook | Run | Source |
|---|---|---|---|
| 1 | ch01_LabCh01_What_Learning_Is.ipynb | GitHub | |
| 3 | ch03_Lab01_2026_stepwise.ipynb | GitHub | |
| 4 | ch04_KidsLab02_MNIST_Digit_Recognition.ipynb | GitHub | |
| 4 | ch04_Lab02_2026_MNIST_10Digit_Interactive.ipynb | GitHub | |
| 5 | ch05_Lab05_2026_Activation_Functions_with_outputs.ipynb | GitHub | |
| 6 | ch06_Lab07_Loss_Functions_with_outputs.ipynb | GitHub | |
| 7 | ch07_Lab03_2026_Backpropagation_ChainRule_ByHand.ipynb | GitHub | |
| 8 | ch08_LabCh08_Optimizers_And_Learning_Rate.ipynb | GitHub | |
| 10 | ch10_LabCh10_Normalization_Layers.ipynb | GitHub | |
| 13 | ch13_KidsLab03_Edge_Detection_Kernels.ipynb | GitHub | |
| 13 | ch13_Lab04_2026_CNN_MNIST_stepwise.ipynb | GitHub | |
| 16 | ch16_KidsLab04_Fashion_MNIST_CNN.ipynb | GitHub | |
| 16 | ch16_KidsLab05_CIFAR10_CNN.ipynb | GitHub | |
| 16 | ch16_KidsLab05_CIFAR10_Layer_Visualization.ipynb | GitHub | |
| 17 | ch17_LabCh17_Residual_Blocks_And_Transfer_Learning.ipynb | GitHub | |
| 18 | ch18_KidsLab06_Word_Magic_Equations.ipynb | GitHub | |
| 19 | ch19_Lab08_RNN_Number_Prediction.ipynb | GitHub | |
| 20 | ch20_KidsLab07_LSTM_Sequence_Predictor.ipynb | GitHub | |
| 20 | ch20_KidsLab08_LSTM_Project.ipynb | GitHub | |
| 20 | ch20_Lab10_LSTM.ipynb | GitHub | |
| 22 | ch22_LabCh22_Attention_By_Hand.ipynb | GitHub | |
| 23 | ch23_LabCh23_Transformer_Block.ipynb | GitHub | |
| 24 | ch24_LabCh24_FeedForward_Layers.ipynb | GitHub | |
| 25 | ch25_LabCh25_Linear_Attention.ipynb | GitHub | |
| 26 | ch26_LabCh26_State_Space_Models.ipynb | GitHub | |
| 27 | ch27_LabCh27_Autoencoders.ipynb | GitHub | |
| 28 | ch28_LabCh28_Variational_Autoencoder.ipynb | GitHub | |
| 29 | ch29_LabCh29_Generative_Models.ipynb | GitHub |
Reviews
What readers think of the book. Every rating counts in the average; names are shown only when a reader gives one.
Loading the reviews…