free to read · 739 pages
The Why Book of Deep LearningPart 2
by Dr. Philemon Paul Daniel
Language models, vision, generative models, other kinds of data, learning by acting, and taking models to production, with a Keras notebook for every chapter. Chapters 33 to 64: the sequel to Part 1, for engineering students and working professionals. Every lab runs on a laptop CPU in about five minutes.
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 VIII · Language Models
- 33Tokenizers: From Text to Integerspp. 3–26
- 34Position: Telling a Transformer Where Things Arepp. 27–48Run it:LabCh34_Position_Encodings
- 35Building a Small GPTpp. 49–68Run it:LabCh35_TinyGPT
- 36Generating Text: Every Decoding Method, and Whenpp. 69–100Run it:LabCh36_Decoding_Methods
- 37Three Families: BERT, GPT and T5pp. 101–122Run it:LabCh37_Masked_vs_Causal
- 38Pretraining at Scalepp. 123–144Run it:LabCh38_Scaling_In_Miniature
- Part IX · Putting Big Models to Work
- 39Fine-Tuning: Standing on a Pretrained Modelpp. 147–166Run it:LabCh39_Fine_Tuning
- 40LoRA and Other Small Adapterspp. 167–186Run it:LabCh40_LoRA_By_Hand
- 41Prompting and In-Context Learningpp. 187–208Run it:LabCh41_In_Context_Learning
- 42Retrieval-Augmented Generationpp. 209–230Run it:LabCh42_Tiny_RAG
- 43Tools and Agentspp. 231–252Run it:LabCh43_Tool_Loop
- 44Shaping Behaviour: Instruction Tuning, RLHF and Evaluationpp. 253–274Run it:LabCh44_Evaluating_Models
- Part X · Seeing More
- 45Vision Transformerspp. 277–298Run it:LabCh45_Tiny_ViT
- 46Object Detectionpp. 299–320Run it:LabCh46_Detection_By_Hand
- 47Segmentation and the U-Netpp. 321–342Run it:LabCh47_Tiny_UNet
- 48Self-Supervised Learningpp. 343–364
- 49CLIP and Multimodal Modelspp. 365–386Run it:LabCh49_Tiny_CLIP
- Part XI · Imagining in Depth
- 50Diffusion by Handpp. 389–410Run it:LabCh50_Diffusion_By_Hand
- 51Guidance, Samplers and Latent Diffusionpp. 411–432
- 52Flow Matching and Fast Generationpp. 433–452Run it:LabCh52_Flow_Matching_2D
- 53Sound: Speech and Audiopp. 453–474Run it:LabCh53_Sound_By_Hand
- Part XII · Other Shapes of Data
- 54Graph Neural Networkspp. 477–498Run it:LabCh54_Graph_Networks
- 55Time Series and Forecastingpp. 499–518Run it:LabCh55_Forecasting_Honestly
- 56Tables and Recommenderspp. 519–540
- 57Reinforcement Learning: Learning from Rewardpp. 541–560
- 58Deep Reinforcement Learningpp. 561–582Run it:LabCh58_DQN_CartPole
- Part XIII · Small, Fast and Shipped
- 59Where the Time and Memory Gopp. 585–606
- 60Smaller Models: Quantization, Pruning and Distillationpp. 607–638Run it:LabCh60_Shrinking_A_Model
- 61Shipping and Watching a Modelpp. 639–660Run it:LabCh61_Ship_And_Watch
- Part XIV · Trust and Craft
- 62Looking Inside: Interpretabilitypp. 663–684Run it:LabCh62_Looking_Inside
- 63Robustness, Uncertainty and Calibrationpp. 685–706
- 64The Big Cheat Sheets, Part 2pp. 707–734
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-2, each named after its main chapter. Tested with TensorFlow 2.21 and Keras 3.14.
| Ch. | Notebook | Run | Source |
|---|---|---|---|
| 33 | ch33_LabCh33_Tokenizers_BPE_By_Hand.ipynb | GitHub | |
| 34 | ch34_LabCh34_Position_Encodings.ipynb | GitHub | |
| 35 | ch35_LabCh35_TinyGPT.ipynb | GitHub | |
| 36 | ch36_LabCh36_Decoding_Methods.ipynb | GitHub | |
| 37 | ch37_LabCh37_Masked_vs_Causal.ipynb | GitHub | |
| 38 | ch38_LabCh38_Scaling_In_Miniature.ipynb | GitHub | |
| 39 | ch39_LabCh39_Fine_Tuning.ipynb | GitHub | |
| 40 | ch40_LabCh40_LoRA_By_Hand.ipynb | GitHub | |
| 41 | ch41_LabCh41_In_Context_Learning.ipynb | GitHub | |
| 42 | ch42_LabCh42_Tiny_RAG.ipynb | GitHub | |
| 43 | ch43_LabCh43_Tool_Loop.ipynb | GitHub | |
| 44 | ch44_LabCh44_Evaluating_Models.ipynb | GitHub | |
| 45 | ch45_LabCh45_Tiny_ViT.ipynb | GitHub | |
| 46 | ch46_LabCh46_Detection_By_Hand.ipynb | GitHub | |
| 47 | ch47_LabCh47_Tiny_UNet.ipynb | GitHub | |
| 48 | ch48_LabCh48_Contrastive_Pretraining.ipynb | GitHub | |
| 49 | ch49_LabCh49_Tiny_CLIP.ipynb | GitHub | |
| 50 | ch50_LabCh50_Diffusion_By_Hand.ipynb | GitHub | |
| 51 | ch51_LabCh51_Guidance_And_Fast_Sampling.ipynb | GitHub | |
| 52 | ch52_LabCh52_Flow_Matching_2D.ipynb | GitHub | |
| 53 | ch53_LabCh53_Sound_By_Hand.ipynb | GitHub | |
| 54 | ch54_LabCh54_Graph_Networks.ipynb | GitHub | |
| 55 | ch55_LabCh55_Forecasting_Honestly.ipynb | GitHub | |
| 56 | ch56_LabCh56_Two_Tower_Recommender.ipynb | GitHub | |
| 57 | ch57_LabCh57_Q_Learning_Grid_World.ipynb | GitHub | |
| 58 | ch58_LabCh58_DQN_CartPole.ipynb | GitHub | |
| 59 | ch59_LabCh59_Profiling_A_Training_Run.ipynb | GitHub | |
| 60 | ch60_LabCh60_Shrinking_A_Model.ipynb | GitHub | |
| 61 | ch61_LabCh61_Ship_And_Watch.ipynb | GitHub | |
| 62 | ch62_LabCh62_Looking_Inside.ipynb | GitHub | |
| 63 | ch63_LabCh63_Fool_It_Then_Calibrate_It.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…