No. 261 of 500 No. 25 in Deep Learning

Generative Deep Learning

Teaching Machines to Paint, Write, Compose, and Play

By David Foster

Published
June 6, 2023
Print length
453 pages
Reading level
Intermediate
ISBN-13
978-1098134181
Publisher
O'Reilly Media
Written for
Data scientists and ML engineers with Python and basic deep learning experience who want to build generative models.

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

  • Influence30%

    21.0/30
  • Authority25%

    17.5/25
  • Practical value20%

    16.0/20
  • Currency15%

    9.8/15
  • Readability10%

    7.5/10
  • Editorial score

    71.8/100

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
InputPoints
Observable signals22.0/55
Reach (Amazon ratings volume)8.4/16.5
Consensus across best-of lists5.5/13.8
Awards and bestseller evidence0.0/8.3
Reader rating, sample-adjusted5.9/8.3
Amazon sales rank0.5/5.5
Recency1.7/2.8
Editorial review32.4/45
Author authority7.9/11.3
Influence9.5/13.5
Practical value7.2/9.0
Readability3.4/4.5
Currency4.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

  1. Generative models learn an approximation of the probability distribution behind training data, then sample from it to create new, plausible examples.
  2. Each model family, whether VAE, GAN, autoregressive, flow, energy-based or diffusion, makes a different trade-off among sample quality, speed and tractable likelihood.
  3. Diffusion models generate images by learning to reverse a gradual noising process, an approach that underpins modern text-to-image systems.
  4. 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

David Foster

David Foster is a data scientist, entrepreneur and educator and a co-founder of Applied Data Science Partners, a London consultancy that builds data science and AI solutions for organizations. He holds an MA in mathematics from Trinity College, Cambridge, and an MSc in operational research from the University of Warwick, and teaches at the Machine Learning Institute.

Questions

Which edition of Generative Deep Learning should I read?
Choose the second edition, published by O'Reilly in 2023. The 2019 first edition focused mainly on VAEs, GANs and early sequence models, while the second adds chapters on diffusion models, normalizing flows, energy-based models, transformers and multimodal systems, and its accompanying code was rebuilt. The first edition's GitHub repository is no longer maintained.
Do I need to know PyTorch or TensorFlow for Generative Deep Learning?
The book's examples use TensorFlow and Keras, so familiarity with Python and basic Keras helps, though Foster reviews deep learning fundamentals early. Readers who work in PyTorch can still follow the explanations, which are framework-independent, but will need to translate the code themselves or rely on separate PyTorch resources.
Is Generative Deep Learning worth reading in 2026?
Yes, for anyone who wants to understand how generative models work rather than only call them through an API. Its explanations of VAEs, GANs, diffusion and transformers remain sound, and building each from scratch develops lasting intuition. It does not cover developments after 2023, such as reasoning models, agent frameworks or video diffusion, so pair it with recent material.

Sources

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.