Generative Adversarial Networks Explained with a Classic Spongebob Squarepants Episode

Plus a Tensorflow tutorial for implementing your own GAN

Left: real images. Right: images generated by GAN. Taken from OpenAI post on generative networks: https://openai.com/blog/generative-models/

No Weenies Allowed

The Math & Code

The gradient ascent expression for the discriminator. The first term corresponds to optimizing the probability that the real data (x) is rated highly. The second term corresponds to optimizing the probability that the generated data G(z) is rated poorly. Notice we apply the gradient to the discriminator, not the generator.
The gradient descent expression for the generator. The term corresponds to optimizing the probability that the generated data G(z) is rated highly. Notice we apply the gradient to the generator network, not the discriminator.
An example architecture for generator and discriminator networks. Both utilize convolutional layers to process visual information. Modified from http://arxiv.org/abs/1511.06434

PhD. Interests include Deep (Reinforcement) Learning, Computational Neuroscience, and Phenomenology.

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