As shown in the following diagram, the Generative Adversarial Networks, popularly known as GANs, have two models working in sync to learn and train on complex data such as images, videos or audio files:
Intuitively, the generator model generates data starting from random noise but slowly learns how to generate more realistic data. The generator output and the real data is fed into the discriminator that learns how to differentiate fake data from real data.
Thus, both generator and discriminator play an adversarial game where the generator tries to fool the discriminator by generating as real data as possible, and the discriminator tries not to be fooled by identifying fake data from real data, thus the discriminator tries to minimize the classification loss. Both the models are trained in a lockstep fashion.
Mathematically, the generative model...