I did not make this. Two competing neural networks did. Fighting over a number. Together, they form what is called a GENERATIVE ADVERSARIAL NETWORK.
What is a Generative Adversarial Network?
To put it (relatively) simply, Generative Adversarial Networks, or GANs, are machine learning frameworks that are able to generate new things, or improve existing things. There are countless applications, such as the creation of images based on text, improving the resolution and colleagues in 2014. Some of the results still feel uncanny, or are plain nightmare material, yet, over the past few years, others have improved to a point over the years, where you really can’t tell anymore if the image you’re looking at is a real photo of a cat/car/person or not.
How does a GAN work?
The DISCRIMINATOR is a classifier. Its job is to look at an image and decide if said image is real or fake. The images can either come from the original dataset (pictures of cats, pizza, people…), or are creations of the generator. The discriminator outputs a number between 0, if it thinks the image is fake, and 1, if it thinks the image is real.
The GENERATOR creates new images. It is initially fed with random noise from which it generates a new image. The random noise allows it to create multiple valid outputs.
The GAN has an architecture that makes these two networks compete against each other in a min-max game. In short, they are fighting over one number: the output – or error rate – of the discriminator. One network wants the error rate to be as high as possible (the generator), the other one wants it to be as low as possible (the discriminator). If the generator produces an image, which the discriminator can easily classify as fake, it is trained to not repeat its mistake again. On the other hand, if it produces an image which the discriminator can not easily classify, it learns to do it again. The quality of the output results from the way the networks are trained.