Buy New
-41%
$47.37$47.37
FREE delivery Sunday, June 14
Ships from: Amazon.com Sold by: Amazon.com
Used - Very Good
$31.73$31.73
FREE delivery June 14 - 16
Ships from: Wholesale Textbooks Direct Sold by: Wholesale Textbooks Direct
Sorry, there was a problem.
There was an error retrieving your Wish Lists. Please try again.Sorry, there was a problem.
List unavailable.
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Generative Deep Learning: Teaching Machines To Paint, Write, Compose, and Play
Purchase options and add-ons
Generative AI is the hottest topic in tech. This practical book teaches machine learning engineers and data scientists how to use TensorFlow and Keras to create impressive generative deep learning models from scratch, including variational autoencoders (VAEs), generative adversarial networks (GANs), Transformers, normalizing flows, energy-based models, and denoising diffusion models.
The book starts with the basics of deep learning and progresses to cutting-edge architectures. Through tips and tricks, you'll understand how to make your models learn more efficiently and become more creative.
- Discover how VAEs can change facial expressions in photos
- Train GANs to generate images based on your own dataset
- Build diffusion models to produce new varieties of flowers
- Train your own GPT for text generation
- Learn how large language models like ChatGPT are trained
- Explore state-of-the-art architectures such as StyleGAN2 and ViT-VQGAN
- Compose polyphonic music using Transformers and MuseGAN
- Understand how generative world models can solve reinforcement learning tasks
- Dive into multimodal models such as DALL.E 2, Imagen, and Stable Diffusion
This book also explores the future of generative AI and how individuals and companies can proactively begin to leverage this remarkable new technology to create competitive advantage.
- ISBN-101098134184
- ISBN-13978-1098134181
- Edition2nd
- PublisherO'Reilly Media
- Publication dateJune 6, 2023
- LanguageEnglish
- Dimensions7 x 0.75 x 9.25 inches
- Print length453 pages
Frequently bought together

Customers who viewed this item also viewed
AI Engineering: Building Applications with Foundation ModelsPaperbackFREE Shipping by AmazonGet it as soon as Sunday, Jun 14
Build a Large Language Model (From Scratch)PaperbackFREE Shipping by AmazonGet it as soon as Sunday, Jun 14
Hands-On Large Language Models: Language Understanding and GenerationPaperbackFREE Shipping by AmazonGet it as soon as Sunday, Jun 14
Hands-On Generative AI with Transformers and Diffusion ModelsPaperbackFREE Shipping by AmazonGet it as soon as Sunday, Jun 14
Designing Machine Learning Systems: An Iterative Process for Production-Ready ApplicationsPaperbackFREE Shipping by AmazonGet it as soon as Sunday, Jun 14
Deep Learning (Adaptive Computation and Machine Learning series)HardcoverFREE Shipping by AmazonGet it as soon as Sunday, Jun 14
Customers also bought or read
- Natural Language Processing with Transformers, Revised Edition
Paperback$41.60$41.60FREE delivery Sun, Jun 14 - Hands-On Generative AI with Transformers and Diffusion Models
Paperback$45.20$45.20FREE delivery Sun, Jun 14 - Designing Machine Learning Systems: An Iterative Process for Production-Ready Applications
Paperback$40.00$40.00FREE delivery Sun, Jun 14 - Hands-On Large Language Models: Language Understanding and Generation
Paperback$47.69$47.69FREE delivery Sun, Jun 14 - Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems
Paperback$49.50$49.50FREE delivery Sun, Jun 14 - Deep Learning (Adaptive Computation and Machine Learning series)
Hardcover$61.00$61.00FREE delivery Sun, Jun 14 - Machine Learning Design Patterns: Solutions to Common Challenges in Data Preparation, Model Building, and MLOps
Paperback$36.99$36.99FREE delivery Sun, Jun 14 - Prompt Engineering for Generative AI: Future-Proof Inputs for Reliable AI Outputs
Paperback$50.00$50.00FREE delivery Sun, Jun 14 - Deep Reinforcement Learning Hands-On: A practical and easy-to-follow guide to RL from Q-learning and DQNs to PPO and RLHF
Paperback$34.47$34.47Delivery Sun, Jun 14 - Essential Math for AI: Next-Level Mathematics for Efficient and Successful AI Systems
Paperback$44.14$44.14FREE delivery Sun, Jun 14 - Generative AI on AWS: Building Context-Aware Multimodal Reasoning Applications
Paperback$44.89$44.89FREE delivery Sun, Jun 14 - LLM Engineer's Handbook: Master the art of engineering large language models from concept to production
Paperback$44.99$44.99FREE delivery Sun, Jun 14 - AI Engineering: Building Applications with Foundation Models#1 Best SellerNatural Language Processing
Paperback$57.19$57.19FREE delivery Sun, Jun 14 - Hands-On Machine Learning with Scikit-Learn and PyTorch: Concepts, Tools, and Techniques to Build Intelligent Systems
Paperback$83.87$83.87FREE delivery Sun, Jun 14 - Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD
Paperback$41.57$41.57FREE delivery Sun, Jun 14 - Building AI Agents with LLMs, RAG, and Knowledge Graphs: A practical guide to autonomous and modern AI agents
Paperback$44.99$44.99FREE delivery Sun, Jun 14 - Fundamentals of Deep Learning: Designing Next-Generation Machine Intelligence Algorithms
Paperback$50.99$50.99FREE delivery Sun, Jun 14 - Large Language Models: A Deep Dive: Bridging Theory and Practice
Hardcover$62.56$62.56FREE delivery Sun, Jun 14 - Machine Learning with PyTorch and Scikit-Learn: Develop machine learning and deep learning models with Python
Paperback$37.95$37.95FREE delivery Sun, Jun 14 - AI Systems Performance Engineering: Optimizing Model Training and Inference Workloads with GPUs, CUDA, and PyTorch
Paperback$83.40$83.40FREE delivery Sun, Jun 14 - Generative AI with Python and PyTorch: Navigating the AI frontier with LLMs, Stable Diffusion, and next-gen AI applications
Paperback$32.99$32.99Delivery Sun, Jun 14 - Reinforcement Learning, second edition: An Introduction (Adaptive Computation and Machine Learning series)
Hardcover$68.99$68.99FREE delivery Sun, Jun 14 - Mathematics of Machine Learning: Master linear algebra, calculus, and probability for machine learning
Paperback$50.99$50.99FREE delivery Sun, Jun 14 - AI and Machine Learning for Coders: A Programmer's Guide to Artificial Intelligence
Paperback$37.85$37.85FREE delivery Sun, Jun 14 - Probabilistic Machine Learning: An Introduction (Adaptive Computation and Machine Learning series)
Hardcover$105.22$105.22FREE delivery Sun, Jun 14
From the brand
-
Machine Learning, AI & more
-
Machine Learning
-
Artificial Intelligence
-
Deep Learning
-
Language Processing (NLP, LLM)
-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
From the Publisher
From the Preface
Objective and Approach
This book assumes no prior knowledge of generative AI. We will build up all of the key concepts from scratch in a way that is intuitive and easy to follow, so don’t worry if you have no experience with generative AI. You have come to the right place!
Rather than only covering the techniques that are currently in vogue, this book serves as a complete guide to generative modeling that covers a broad range of model families. There is no one technique that is objectively better or worse than any other—in fact, many state-of-the-art models now mix together ideas from across the broad spectrum of approaches to generative modeling. For this reason, it is important to keep abreast of developments across all areas of generative AI, rather than focusing on one particular kind of technique. One thing is certain: the field of generative AI is moving fast, and you never know where the next groundbreaking idea will come from!
With this in mind, the approach I will take is to show you how to train your own generative models on your own data, rather than relying on pre-trained off-the-shelf models. While there are now many impressive open source generative models that can be downloaded and run in a few lines of code, the aim of this book is to dig deeper into their architecture and design from first principles, so that you gain a complete understanding of how they work and can code up examples of each technique from scratch using Python and Keras.
In summary, this book can be thought of as a map of the current generative AI landscape that covers both theory and practical applications, including full working examples of key models from the literature. We will walk through the code for each step by step, with clear signposts that show how the code implements the theory underpinning each technique. This book can be read cover to cover or used as a reference book that you can dip into. Above all, I hope you find it a useful and enjoyable read!
Prerequisites
This book assumes that you have experience coding in Python. If you are not familiar with Python, the best place to start is through LearnPython.org. There are many free resources online that will allow you to develop enough Python knowledge to work with the examples in this book.
Also, since some of the models are described using mathematical notation, it will be useful to have a solid understanding of linear algebra (for example, matrix multiplication) and general probability theory. A useful resource is Deisenroth et al.’s book Mathematics for Machine Learning (Cambridge University Press), which is freely available.
The book assumes no prior knowledge of generative modeling (we will examine the key concepts in Chapter 1) or TensorFlow and Keras (these libraries will be introduced in Chapter 2).
Editorial Reviews
Review
David Ha
Head of Strategy, Stability AI
This book is becoming part of my life. On finding a copy in my living room I asked my son: "when did you get this?". He replied, "when you gave it to me", bemused by my senior moment. Going through various sections together, I came to regard Generative Deep Learning as the 'Gray's Anatomy' of Generative AI.
The author dissects the anatomy of Generative AI with an incredible clarity and reassuring authority. He offers a truly remarkable account of a fast-moving field, underwritten with pragmatic examples, engaging narratives and references that are so current, it reads like a living history.
Throughout his deconstructions, the author maintains a sense of wonder and excitement about the potential of Generative AI - especially evident in the book's compelling dénouement: having laid bare the technology, the author reminds us that we are at the dawn of a new age of intelligence. An age in which Generative AI holds a mirror up to our language, our art, our creativity; reflecting not just what we have created, but what we could create — what we can create — limited only by "your own imagination".
The central theme of generative models in artificial intelligence resonates deeply with me, because I see exactly the same themes emerging in the natural sciences; namely, a view of ourselves as generative models of our lived world. I suspect - in the next edition of this book — we will read about the confluence of artificial and natural intelligence. Until that time, I will keep this edition next to my Gray's Anatomy, and other treasures on my bookshelf.
Karl Friston, FRS
Professor of Neuroscience, University College London.
Generative AI is reshaping countless industries and powering a new generation of creative tools. This book is the perfect way to get going with generative modeling and start building with this revolutionary technology yourself.
Ed Newton-Rex
VP Audio at Stability AI and composer
An excellent book that dives right into all of the major techniques behind state-of-the-art generative deep learning. You'll find intuitive explanations and clever analogies -- backed by didactic, highly readable code examples. An exciting exploration of one of the most fascinating domains in AI!
Francois Chollet, Creator of Keras
Generative AI is the next revolutionary step in AI technology that will have a massive impact on the world. This book provides a great introduction to this field and its incredible potential and potential risks.
Connor Leahy, CEO at Conjecture and Co-Founder of EleutherAI
About the Author
Through ADSP, David leads the delivery of high-profile data science and AI projects across the public and private sectors. He has won several international machine-learning competitions and is a faculty member of the Machine Learning Institute. He has given talks internationally on topics related to the application of cutting-edge data science and AI within industry and academia.
Product details
- Publisher : O'Reilly Media
- Publication date : June 6, 2023
- Edition : 2nd
- Language : English
- Print length : 453 pages
- ISBN-10 : 1098134184
- ISBN-13 : 978-1098134181
- Item Weight : 1.6 pounds
- Dimensions : 7 x 0.75 x 9.25 inches
- Best Sellers Rank: #180,101 in Books (See Top 100 in Books)
- #22 in Machine Theory (Books)
- #52 in Computer Neural Networks
- #67 in Natural Language Processing (Books)
- Customer Reviews:
About the author

David Foster is a data scientist, entrepreneur, and educator specializing in AI applications within creative domains. As co-founder of Applied Data Science Partners (ADSP), he inspires and empowers organizations to harness the transformative power of data and AI.
David holds an MA in Mathematics from Trinity College, Cambridge, an MSc in Operational Research from the University of Warwick, and is a faculty member of the Machine Learning Institute, with a focus on the practical applications of AI and real-world problem-solving.
His research interests include enhancing the transparency and interpretability of AI algorithms, and he has published literature on explainable machine learning within healthcare.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Generated from the text of customer reviewsSelect to learn more
Reviews with images
First of all
Top reviews from the United States
- 5 out of 5 stars
Excellent review of types of deep learning models for generative tasks
Reviewed in the United States on May 30, 2024In 2019 I bought, read and thoroughly loved the first edition of this book. One reason I loved that edition was the author’s excellent way of explaining generative adversarial networks (GAN), with humorous and relevant examples. At that point I was a lot more naive about the various deep learning models (ANN, RNN, CNN etc) and for a while I was unable to see where GANs fit in in the grand scheme or evolution of deep learning models.
With the explosion in interest in generative AI after the release of ChatGPT-3, I read “Natural Language Processing with Transformers” by Turnstall etc. to get an understanding of the Transformer model. Along the way I read other sources of information on language models such as a paper “Survey of Large Language Models” by Socher etc. That later paper gave an excellent overview of the evolution of language models (statistical language models --> neural language models --> pretrained language models —> large language models). I also saw where language models fit in in the context of ANNs, RNN, CNN etc.
When I saw that the author released a second edition of “Generative Deep Learning”, I noticed that the content had changed (ie increased) from the first edition, and I immediately decided to buy the second edition. This second edition has an excellent overview of the evolution of generative models, in fact 6 of them (variational auto encoders (VAE) —> generative adversarial networks (GAN) —> autoregressive models —> normalizing flow models —> energy based models —> diffusion models). I had never heard of some of these models. According to this author the Transformer is an application of generative deep learning models. The author goes on to describe other applications such as music generation and multimodal models.
While this book requires one to know Python programming and offers code on GitHub, I was able to skip running the code and still learn a lot about generative deep learning. (I tried to run the code examples but couldn’t get around to it. I wish the author provided easier Jupyter notebooks for running the code).
Another aspect of the book that I loved was the author’s description of key concepts like “probabilistic” versus “deterministic”, “discriminative” versus “generative” etc.
I highly recommend this book as a great resource for a historical overview of generative deep learning. One should read it before one reads anything on just the transformer or language models.
8 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
First of all
Reviewed in the United States on July 29, 2023Hello fellas, I ordered a generative deep learning book from an another source, but had poor quality as well as poor content. But this book is focused on an important part of generative deep learning also has a good quality of content. Really appreciate that I bought this book.

Hello fellas, I ordered a generative deep learning book from an another source, but had poor quality as well as poor content. But this book is focused on an important part of generative deep learning also has a good quality of content. Really appreciate that I bought this book.
One person found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
The book I was looking for
Reviewed in the United States on June 9, 2023Amazing book, for me the best thing about it is that there are many well-sourced and working code and data examples which are explained clearly in the text.
One person found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 4 out of 5 stars
Bought it new, got it used....
Reviewed in the United States on October 26, 2023The book is in very good condition, but it has stick notes in it! I seriously doubt they are from the author....


The book is in very good condition, but it has stick notes in it! I seriously doubt they are from the author....
4 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Love it
Reviewed in the United States on December 27, 2023Awesome book and great codebase. A reference for modern AI.
3 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
highly recommended for beginers
Reviewed in the United States on August 25, 2023This is a lovely book. It is readable and explains the principles behind algorithms clearly.
2 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Learned a lot
Reviewed in the United States on June 14, 2023I haven't finished yet, but it's been helpful to implement the examples. So far it's been a great learning resource.
One person found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 3 out of 5 stars
Good content but poor equation quality in Kindle edition
Reviewed in the United States on June 24, 2023This review is for the Kindle edition. I have the 2nd print edition of the book and it looks like the 3rd edition has some good additions but rushed out. In this day and age of spell-checkers, auto-complete, and now generative AI, it is unacceptable that the electronic version has poor quality.
Subscripts and other type settings are skipped in many places making it harder to read equations.
For example J = dz 1 dx 1... or det abcd = ad bc. For some reason many kindle books are plagued with some symbol getting substituted with a square []. You have to guess what that symbol was supposed to be. For the price, that shouldn't happen.
The irony is this a book about generative AI which is supposed to simplify or at least help in such things. If you can wait, maybe there will be a revised edition.
14 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Top reviews from other countries
Stergios Papadimitriou5 out of 5 starsA superb, practical book
Reviewed in Germany on March 26, 2026An excellent, practical book for deep learning practitioners.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Rob Chen3 out of 5 starsLack of a critical aspect
Reviewed in Canada on July 22, 2023Although the book covers many key techniques in generative AI, a key question needs to be answered, how do we know if it's generating a good quality image other than by eyeballing it?
There should be a section that talks about the joint use of the discriminative model and generative model, for example, if we were using the generative model to augment the dataset for the downstream discriminative task (image classification), how do we evaluate the generated data has been helpful, some may say just look at the performance difference of downstream task, but I bet there is more insight than that, author need to consider this problem in future edition.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Ankit Jain5 out of 5 starsA comprehensive guide to Gen AI that I needed!
Reviewed in India on April 7, 2024Very glad I chanced upon this book. This guide to state-of-the-art Gen AI research is both comprehensive and deep. It helps you grasp the underlying architecture, building blocks and mathematical intuition of wide variety of gen AI models (ranging from text to images to music to multi modality models). The book expects some background and intuition in stats and probability theory. It can be a heavy read at times but that's when you know this has the depth to actually get what's going on in these models and not just learn to call a few APIs in a phyton program. Although, it does include a set of coding exercises too. Strongly recommended.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Cliente Amazon4 out of 5 starsGreat read with good structure to learn the theory and good guidance for practical tests
Reviewed in Italy on August 30, 2023This was a great read to understand how generative AI works, at the right level of detail and very much up to date. The content structure is good to learn the theory starting from the basics and then gradually layering the most complex and recent evolutions. The accompanying TensorFlow workbooks help with practical examples that can be followed.
One negative note: the Kindle version is low quality when it comes to mathematical formulas, impossible to read.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Arnaldo Gualberto5 out of 5 starsMuito bom
Reviewed in Brazil on October 5, 2024O autor é muito bom e o conteúdo também. Dá um overview geral da área e implementações em Tensorflow
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again













