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 ...

Get Hands-On Generative Adversarial Networks with Keras now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.