Implementing A GAN in Keras

“the most interesting idea in the last 10 years in ML”

Sebastian Theiler
Analytics Vidhya

--

[GANs], and the variations that are now being proposed is the most interesting idea in the last 10 years in ML, in my opinion. -Yann LeCun

Generative Adversarial Networks, or GANs for short, are some of the most potent tools a machine learning practitioner can use.

GANs are capable of doing everything from super-resolution in images, to image translation, to facial manipulation, to medicine creation, to much, much more.

A GAN translating zebras to horses and vice versa
Only possible with the power of GANs

Content

In this article, we will cover both the intuition behind how GANs work, and how we can implement them in Keras. Specifically, we will be first implementing a fully-connected GAN (FCGAN) for MNIST, then later improving that into a deep convolutional GAN (DCGAN) for a class of CIFAR-10.

Feel free to skip to the code if you already have an understanding of the intuition behind GANs.

The completed code we will be creating in this tutorial is available on my GitHub, here.

How GANs Work

--

--

Sebastian Theiler
Analytics Vidhya

This account is inactive now; thank you to everyone who has read my pieces! I’m so glad I could share some knowledge about AI and data science. I might return…