GANs: Generative Adversarial Networks

MIKE ARMISTEAD
2 min readNov 29, 2020

Generative adversarial networks (GANs) can be used to help train a deep network model. What GANs can do is use the information that it learns from the data and creates new examples that could be true to what it learned.

GANs models contain 2 different models. One model is called the generator model and it creates the new examples from the old data. The second model is called the discriminator and determines whether a prediction is fake or real. A threshold of 50% is put on the discriminator model and once the generator is able to beat the discriminator past that threshold we keep the generator model. The threshold is used for 50% because at that point the discriminator is randomly guessing if it is real or made up data. The generator and discriminator are trained at the same time. The generator will create batches of new examples and give them to the discriminator along with examples from the training data and decided whether the data is real or made up. When the discriminator is wrong with a prediction it is then updated to get better with predictions. The generator is then updated on how well or unwell the discriminator is able to predict real or made up data.

Since either the discriminator gets better and the generator gets penalized or the discriminator gets penalized and the generator gets better we call this model a zero-sum game. This is because the gaining from one model is from the lose of the other model so they cancel each other out.

If you are ever low on data for images you can use a GANs model to help you build a data set that can give you new made up data that looks real enough to trick the discriminator model.

--

--