What are GANs

Source: Deep Learning on Medium

Generative adversarial networks (GANs) are a model of unsupervised machine learning initially thought up by Ian Goodfellow, a celebrated researcher in the field of machine learning. The idea itself is a very interesting one, here two neural networks act as opponents and so are made to work against each other hence adversarial networks.

A good example to illustrate this is, one neural net is like a forger and the other is an investigator, the forger’s motive is to, let’s say, make a fake painting to bypass the investigator and the investigator’s motive is to figure out if the painting is fake or not. By having many rounds of this interaction of the forger trying to fool the investigator and the investigator trying to catch the forger, both forger and the investigator get better at their tasks. In the end, if we chuck away the investigator what remains is a neural network that is amazing at generating paintings.

The forger network is called the generator and the investigator is called the discriminator. The discriminator is initially trained like a classifier using a dataset. Then the generator is fed random noise to generating “something” which is obviously rejected by the discriminator. This is done again and again until they both get better and better and start competing with each other. Theoretically, a point is reached where the generator is producing images indistinguishable from real ones and the discriminator outputs 0.5.

Credit: O’Reilly

Some cool GAN projects to look at are:

Generation of cat images


Generation of anime girl images


More at:

Since this was an extremely simplified explanation, here are some more resources to refer: