Reader small image

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

Product typeBook
Published inMay 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789538205
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Rafael Valle
Rafael Valle
author image
Rafael Valle

Rafael Valle is a research scientist at NVIDIA focusing on audio applications. He has years of experience developing high performance machine learning models for data/audio analysis, synthesis and machine improvisation with formal specifications. Dr. Valle was the first to generate speech samples from scratch with GANs and to show that simple yet efficient techniques can be used to identify GAN samples. He holds an Interdisciplinary PhD in Machine Listening and Improvisation from UC Berkeley, a Masters degree in Computer Music from the MH-Stuttgart in Germany and a Bachelors degree in Orchestral Conducting from UFRJ in Brazil.
Read more about Rafael Valle

Right arrow

Training your GAN

In Chapter 2, Introduction to Generative Models, we described GANs as a two-player min-max game, in which the Discriminator and Generator take turns. Informally speaking, the Discriminator learns to identify whether a sample is real or fake while the Generator tries to produce samples that the Discriminator believes to be real.

The implementation of this procedure is, indeed, similar to the informal description. Although, in our first implementation, each model will take one turn at a time, it is possible, and sometimes desirable, to have one model taking more turns than the other.

Our training procedure starts with sampling fake data produced by the Generator and real data. Note that, at this stage, we are not updating the Generator and no gradient is flowing through. Let's start with our method header:

def train(ndf=64, ngf=64, z_dim=100, lr_d=2e-4, lr_g...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Generative Adversarial Networks with Keras
Published in: May 2019Publisher: PacktISBN-13: 9781789538205

Author (1)

author image
Rafael Valle

Rafael Valle is a research scientist at NVIDIA focusing on audio applications. He has years of experience developing high performance machine learning models for data/audio analysis, synthesis and machine improvisation with formal specifications. Dr. Valle was the first to generate speech samples from scratch with GANs and to show that simple yet efficient techniques can be used to identify GAN samples. He holds an Interdisciplinary PhD in Machine Listening and Improvisation from UC Berkeley, a Masters degree in Computer Music from the MH-Stuttgart in Germany and a Bachelors degree in Orchestral Conducting from UFRJ in Brazil.
Read more about Rafael Valle