Introduction to GAN

Original article can be found here (source): Deep Learning on Medium

Figure 1.13

Welcome!!! It is always a great idea to get a story from a picture. Here is a story where a forger is quite smart. He sells the fake milk and milk shop-owner can tell that it is fake. The forger is smart as he starts learning from feedback given by shop-owner. Every next time, he produces a bit less fake milk and learns from feedback. Eventually, the forger would be able to over smart the shop owner. The forger, finally, generates the milk as close as real milk.

Congratulations!!! You have understood GAN. Here the forger is the generator, and the show owner is the discriminator. GAN consists of two deep learning models, one generator model and one discriminator model. In short, we can summarize GAN as follows

1. Generator (forger) generates/creates/manufactures milk and

2. Discriminator (milk shop-owner/ expert person who knows real milk and fake milk)

3. In the first go, generator (forger) generates milk and discriminator (milk shop-owner) can tell that this is fake. Learning from feedback/loss function, the forger (generator) improves next time, again discriminator tells that this is fake, but this fake would be less fake than the first one. In this way, feedback helps the forger improve the milk quality until the time discriminator says that the milk is real.

a. Let us come to the formal look

1.8 GAN architecture and explanation

Figure 1.14

GANs or Generative Adversarial Networks is a framework for estimating generative models. Two models are trained simultaneously by an adversarial process: a generator, which is responsible for generating data , and a discriminator, which is responsible for estimating the probability that an image was drawn from the training data (the image is real), or was produced by the generator (the image is fake). During training, the generator becomes progressively better at generating images, until the discriminator is no longer able to distinguish real images from fake.

GAN is inspired by the zero-sum non-cooperative game. It means that if one wins, the other loses. A zero-sum game is also known as minimax. Player A wants to maximize its actions, but player B want to minimize them. In-game theory, the GAN model converges when the discriminator (player A) and the generator (player B) reach Nash equilibrium. This is the optimal point for the minimax equation.

Above article is taken from the book : GAN with Industrial Use cases

GAN with Indutrial Use cases (US market)