Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Generative Adversarial Networks with Keras

You're reading from  Hands-On Generative Adversarial Networks with Keras

Product type Book
Published in May 2019
Publisher Packt
ISBN-13 9781789538205
Pages 272 pages
Edition 1st Edition
Languages
Author (1):
Rafael Valle Rafael Valle
Profile icon Rafael Valle

Table of Contents (14) Chapters

Preface 1. Section 1: Introduction and Environment Setup
2. Deep Learning Basics and Environment Setup 3. Introduction to Generative Models 4. Section 2: Training GANs
5. Implementing Your First GAN 6. Evaluating Your First GAN 7. Improving Your First GAN 8. Section 3: Application of GANs in Computer Vision, Natural Language Processing, and Audio
9. Progressive Growing of GANs 10. Generation of Discrete Sequences Using GANs 11. Text-to-Image Synthesis with GANs 12. TequilaGAN - Identifying GAN Samples 13. Whats next in GANs

Experimental setup

In this section, we are going to implement training functions that are compatible with the Progressive Growing of GANs methodology. These training and logging functions will be used to train the discriminator and the generator, which will also be implemented in this section.

We will also implement helper functions in order to make it easier to compute our loss function based on the Wasserstein GAN with Gradient Penalty.

Training

Our training method consists of the following two parts:

  • Initializing the required variables and compiling models
  • The training loop itself

We will start by looking at the training layout:

def train(n_channels=3, resolution=32, z_dim=128, n_labels=0, lr=1e-3,
e_drift=1e...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}