Generative Deep Learning
Teaching Machines to Paint, Write, Compose, and Play
By David Foster
Synopsis
David Foster's Generative Deep Learning first appeared from O'Reilly in 2019, and a substantially expanded second edition followed in 2023 to cover the diffusion and transformer models behind the generative AI boom. The second edition runs to roughly 450 pages in three parts. After two chapters on generative modeling and deep learning basics, Foster devotes a chapter each to variational autoencoders, generative adversarial networks, autoregressive models, normalizing flows, energy-based models and diffusion models, explaining the probability ideas behind each before building a working version in TensorFlow and Keras.
The applications section covers transformers and GPT-style text generation, advanced GANs such as StyleGAN, music generation, world models for reinforcement learning and multimodal systems such as text-to-image generators, before a concluding look at where the field is heading. Examples include changing facial expressions with a VAE, generating flower images with a diffusion model and composing polyphonic music. The official GitHub repository supplies the accompanying code. Readers come away understanding not just how to call a model but why each architecture works, which makes the book a strong bridge between introductory deep learning and research papers. The main drawback is the framework choice, since much of the field now works in PyTorch.
Scorecard
Editorial score
How it scored
Editorial score: 71.8 / 1005 weighted criteria
- 21.0/30
Influence30%
- 17.5/25
Authority25%
- 16.0/20
Practical value20%
- 9.8/15
Currency15%
- 7.5/10
Readability10%
- 71.8/100
Editorial score
How the rank was computed
Rank No. 261 of 500 comes from a composite of 54.4: observable signals 22.0 of 55 points plus editorial review 32.4 of 45 points.
All 11 inputs
| Input | Points |
|---|---|
| Observable signals | 22.0/55 |
| Reach (Amazon ratings volume) | 8.4/16.5 |
| Consensus across best-of lists | 5.5/13.8 |
| Awards and bestseller evidence | 0.0/8.3 |
| Reader rating, sample-adjusted | 5.9/8.3 |
| Amazon sales rank | 0.5/5.5 |
| Recency | 1.7/2.8 |
| Editorial review | 32.4/45 |
| Author authority | 7.9/11.3 |
| Influence | 9.5/13.5 |
| Practical value | 7.2/9.0 |
| Readability | 3.4/4.5 |
| Currency | 4.4/6.8 |
Each criterion is scored from 1 to 10 and weighted, and the points add up to the editorial score. The rank combines observable signals (55 percent) with this score (45 percent). Read the methodology.
Verdict
A rigorous, code-first tour of generative model families, from VAEs and GANs to diffusion and transformers, best suited to practitioners using Keras.
Strengths
- Builds every major model family from scratch
- Clear intuition before mathematics and code
- Covers diffusion, transformers and world models
Keep in mind
Code uses TensorFlow and Keras rather than PyTorch, and the 2023 edition predates recent advances in large language models and video generation.
Key takeaways
- Generative models learn an approximation of the probability distribution behind training data, then sample from it to create new, plausible examples.
- Each model family, whether VAE, GAN, autoregressive, flow, energy-based or diffusion, makes a different trade-off among sample quality, speed and tractable likelihood.
- Diffusion models generate images by learning to reverse a gradual noising process, an approach that underpins modern text-to-image systems.
- Transformers treat generation as next-token prediction, and the same architecture extends from text to music and multimodal applications.
Notable facts
- The official code repository for the second edition has drawn roughly 1,600 stars on GitHub. Source (opens in a new tab)
- The 2019 first edition was a bestseller, as noted in Foster's 2023 SuperDataScience podcast appearance marking the second edition's release. Source (opens in a new tab)
About the author
Questions
Which edition of Generative Deep Learning should I read?
Do I need to know PyTorch or TensorFlow for Generative Deep Learning?
Is Generative Deep Learning worth reading in 2026?
Related books
- Speech and Language Processing Daniel Jurafsky and James H. Martin
- Dive into Deep Learning Aston Zhang, Zachary C. Lipton, Mu Li and Alexander J. Smola
- Foundations of Computer Vision Antonio Torralba, Phillip Isola and William T. Freeman
- The StatQuest Illustrated Guide to Neural Networks and AI Josh Starmer
- Deep Learning Andrew Glassner
- Deep Learning Illustrated Jon Krohn, Grant Beyleveld and Aglaé Bassens
Sources
- Generative Deep Learning 2nd Edition - official code repository (GitHub) (opens in a new tab)
- Generative Deep Learning, with David Foster - Jon Krohn / SuperDataScience (opens in a new tab)
- David Foster - O'Reilly author page (opens in a new tab)
- Generative Deep Learning first edition code repository (GitHub) (opens in a new tab)
As an Amazon Associate, Best AI Books earns from qualifying purchases. Best AI Books is sponsored by Iternal.ai, whose founder and CEO, John Byron Hanby IV, wrote The AI Strategy Blueprint, our #1 ranked book. How we rank books.






