O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generative Deep Learning

Book Description

Generative modeling is one of the hottest topics in artificial intelligence. Recent advances in the field have shown how it’s possible to teach a machine to excel at human endeavors—such as drawing, composing music, and completing tasks by generating a world model to understand how its actions affect its environment.

With this practical book, machine learning engineers and data scientists will learn how to recreate some of the most famous examples of generative deep learning models, such as variational autoencoders and generative adversarial networks (GANs). You’ll also learn how to apply the techniques to your own datasets.

David Foster, cofounder of Applied Data Science, demonstrates the inner workings of each technique, starting with the basics of deep learning before advancing to the most cutting-edge algorithms in the field. Through tips and tricks, you’ll learn how to make your models learn more efficiently and become more creative.

  • Get a fundamental overview of generative modeling
  • Learn how to use the Keras and TensorFlow libraries for deep learning
  • Discover how variational autoencoders (VAEs) work
  • Get practical examples of generative adversarial networks (GANs)
  • Understand how to build generative models that learn how to paint, write, and compose
  • Apply generative models within a reinforcement learning setting to accomplish tasks

Table of Contents

  1. 1. Generative Modeling
    1. What is Generative Modeling?
      1. Generative vs discriminative modeling
      2. Advances in machine learning
      3. The rise of generative modeling
      4. The Generative Modeling Framework
    2. Probabalistic generative models
      1. Hello Wrodl!
      2. Your first probabilistic generative model
      3. Naive Bayes
      4. Hello Wrodl! continued…
    3. The challenges of generative modeling
      1. Representation learning
    4. Setting up your environment
    5. Summary
  2. 2. Deep Learning
    1. Structured and unstructured data
    2. Deep neural networks
      1. Keras and Tensorflow
    3. A step by step guide to building a deep neural network
      1. Loading the data
      2. Building the model
      3. Compiling the model
      4. Training the model
      5. Evaluating the model
    4. Improving the model
      1. Convolutional layers
      2. Batch normalization
      3. Dropout layer
      4. Putting it all together
    5. Summary
  3. 3. Variational Autoencoders
    1. The Art Exhibition
    2. Autoencoders
      1. Your first autoencoder
      2. The encoder
      3. The decoder
      4. Joining the encoder to the decoder
      5. Analysis of the autoencoder
    3. The Variational Art Exhibition
    4. Variational Autoencoders
      1. The encoder
      2. The loss function
      3. Analysis of the VAE
    5. Using VAEs to generate faces
      1. Training the VAE
      2. Analysis of the VAE
      3. Generating new faces
      4. Latent space arithmetic
      5. Morphing between faces
    6. Summary
  4. 4. Generative Adversarial Networks
    1. GANimals
    2. Generative Adversarial Networks
      1. Your first GAN
      2. The discriminator
      3. The generator
      4. Training the GAN
    3. GAN challenges
      1. Oscillating loss
      2. Mode collapse
      3. Uninformative loss
      4. Hyperparameters
      5. Improving the GAN
    4. Wasserstein GAN
      1. Wasserstein loss
      2. The Lipschitz constraint
      3. Weight clipping
      4. Training the WGAN
      5. Analysis of the WGAN
    5. WGAN-GP
      1. The gradient penalty loss
      2. Batch normalization in WGAN-GP
      3. Analysis of the WGAN-GP
    6. Summary