Training Our GAN

Discover techniques for training a GAN model and visualizing its output.

We have discussed GANs as a two-player minmax 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.

GAN training procedure

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:

Get hands-on with 1200+ tech skills courses.