DataX Journal
Published in

DataX Journal

The sun setting on a busy city skyline
Photo by Stefan Steinbauer on Unsplash

GANs for the Beginner

To create and to build are uniquely human pursuits. No other species practice the art of building things quite as we do. Moreover, this industrious spirit of humankind is precisely what has led to the rise of a discipline such as generative modeling in the field of AI.

A Simple Idea 💡

A GAN is called adversarial for this reason; two models are competing against each other. The generator is continually trying to develop better, more realistic samples (which are hopefully indistinguishable from the real ones) to try and fool the discriminator. In contrast, the discriminator tries to tell fake, generated samples from real ones successfully.

the words training and real data are used interchangeably to refer to real pre-existing data samples. The words fake and generated data are also used interchangeably to refer to the samples created by our generator by passing in some noise and operating on it.

Optimization Objectives

The Game of Minimax

Therefore, there has to be some equilibrium where the two eventually end up ensuring the best possible performance by both the models without entirely jeopardizing each other.

Puri, Odisha. Photo by Mohan Vamsi on Unsplash

The Cost Function

Entropy for distribution P
Cross-Entropy for distribution Q
KL Divergence as a measure of dissimilarity of two distributions

And the whole point of our machine learning model is to come up with a good Q distribution that maps P well, and hence minimizes this dissimilarity!

Binary Cross-entropy Loss
Loss for a generative~discriminative system

PS: Try the math in your head; the optimization taking place is still the same!

Applications of GANs

Jim Carrey as Jack Torrance from The Shining
Day to Night Pictures from the paper Image-to-Image Translation with Conditional Adversarial Networks
Images generated by BigGAN taken from the paper Large Scale GAN Training for High Fidelity Natural Image Synthesis
Taken from Single Image Super Resolution using GANs
Photo by Amanda Phung on Unsplash

The Future

--

--

--

This is the publication of the Data Science Community, a data science-based student-led innovation community at SRM IST. Here we publish blogs based on Data Analytics, Machine Learning, web and app development, current affairs in technology and more based on experience and work

Recommended from Medium

Is Ekman still relevant when it comes to Emotion AI?

The Narrative of Artificial Intelligence

Technological Threats, Nationalism, Pseudonymization, and Bavarian Elections

Rethinking AI Ethics — Asimov has a lot to answer for

Towards *Generalized* Game-Playing RL Agents

AI Dungeon 2, Let’s Begin a Text Adventure

Tengai is a Physical AI-Robot that Enhances the Candidate Experience

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aditya Shukla

Aditya Shukla

Just a human wandering around, thinking about things and appreciating the beauty of the World.

More from Medium

This time you’ll understand Machine Learning

Types of Machine Learning Algorithms

Real or Fake? How my XMAS Project got inspired by one slide

Machine Learning is Fun!