## What is Generative Adversarial Network?

Many images you see on the internet are often fake computer-generated images. In real life, there is no such image of a dog, butterfly or mushroom. You have seen many examples of this kind recently; human faces, voices, paintings, writings, etc. that are indistinguishable from reality. Most of these studies are done with an artificial neural network (artificial neural network) model called Generative Adversarial Network GAN.

## Generative Adversarial Network - the genesis

The idea for Generative Adversarial Network GAN was born in 2014 during a conversation Ian Goodfellow had with his friends at a party and was subsequently published as an article. This article, which became popular after its publication, has received more than 15000 citations in 5 years and the number of articles published at major conferences in the field exceeds 500 per year.

If you give the Generative Adversarial Network GAN model a sufficient number of samples from the data to be generated, you can have it generate new samples of the same data type. If you give the system thousands of bird photos, the system learns what a bird should look like and generates new bird photos. There are 2 different artificial neural networkswhich are in conflict with each other in GANs.

These are called generator and discriminator networks. The generative network produces new data that looks like reality (images, sounds, models, etc.), while the discriminator network tries to distinguish between fake and real data. As these two neural networks compete with each other, the discriminator network gradually begins to distinguish better between real and fake images.

The generative network creates more realistic fake images. We can compare this command to a counterfeiter and a police officer. Over time, the police get better at catching fake coins to find counterfeiters. The counterfeiter starts to produce more realistic fake coins to beat the police.

## Is it possible to ensure authenticity?

The discriminant network calculates the probabilities that the received images are real and assigns them a value between 0 and 1. A real image should have a probability of 1 and a fake image 0. The discriminant network is trained with the loss value, which is the difference between the probability values it gives and the values it should be.

For example, if the Distinctive network gave a real image a value of 0.7, it made an error of 1 to 0.7 = 0.3. On the contrary, it gave a fake image a value of 0.7, but made an error of 0.7-0 = 0.7. The values of the Discriminant network are updated at each iteration during training to reduce these error values to 0. On the contrary, the producer network wants the fake images it produces to be true, i.e. to be assigned a value of 1.

If the self-generated image gave the discriminating network a score of 0.6, the generating network made an error of 1 to 0.6 = 0.4. The generating network also wants to reduce this error to 0 at each iteration. In this way, as the training process progresses, the discriminating network becomes more successful at distinguishing between real and fake images. The generative network produces more realistic fake images.