Training GANs
Learn how to train GANs and explore the different types of cost functions used.
We'll cover the following...
Training a GAN is like playing this game of two adversaries. The generator is learning to generate good enough fake samples, while the discriminator is working hard to discriminate between real and fake. More formally, this is termed the minimax game, where the value function
This is also called the zero-sum game, which has an equilibrium that is the same as the Nash equilibrium. We can better understand the value function
Where
The objective functions help us to understand the aim of each of the players. If we assume both probability densities are non-zero everywhere, we can get the optimal value of
The next step is to present a training algorithm wherein the discriminator and generator models train toward their respective objectives.
Training algorithm
The simplest yet widely used way of training a GAN (and by far the most successful one) is as follows:
Repeat the following steps
Step 1: Repeat steps
times: Sample a minibatch of size
from the generator: { ...