Skip to content

InfoGAN: A neural net which learns compact representations of data (SIPB class)

Photo of Alex
Hosted By
Alex
InfoGAN: A neural net which learns compact representations of data (SIPB class)

Details

Last time, we went through the basic operation of a convolutional neural net (https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/3_NeuralNetworks/convolutional_network.py). This time, we'll build on that with InfoGAN (https://github.com/openai/InfoGAN). It's actually a set of three neural networks which cooperate / compete with each other to learn to generate images similar to the ones you provide it during training. Here is its output, trained on a collection of faces (we'll be working with MNIST digits on Thursday, though.)

https://openai.com/assets/research/generative-models/infogan-4-c365dd84f656915bd0efb1a22d69a3caecdea5d8c9993a499230d792ce308d11.jpg

When you ask InfoGAN to generate an image, you provide it a set of random numbers to build it from. What the above array of faces shows is the variation along the rows as you change just one of those numbers, which controls the width of the face. InfoGAN's architecture and the training data say nothing about width at all, InfoGAN just figures out on its own that width is a relevant variable.

There is a lot of seemingly intimidating math in the InfoGAN paper (https://arxiv.org/pdf/1606.03657v1.pdf). Don't worry, though: the operation of the network can be explained in much simpler terms, and I will do so!

I got consistent feedback last time that people missed the practical aspect of the first tutorial, so we will go back to that this time -- if you come, you will be able to run your own instance of InfoGAN. This will also provide an introduction to tensorboard (https://www.tensorflow.org/versions/r0.12/how_tos/summaries_and_tensorboard/index.html), a way of visualizing progress as a network learns, and outputting customized debugging information. Once everyone who wants to has got the network going, I'll give a brief overview of how it works, and then we'll go through the code.

If you want to follow along like that, you will need access to a machine with a GPU. I will again provide access to such machines for $5 each, or you can set one up on AWS yourself. If you want to do it yourself, please create an AWS account (https://github.com/coventry/tfintro/blob/master/notes.org#create-aws-account) ahead of time, and make sure that you can run a GPU-backed instance (https://github.com/coventry/tfintro/blob/master/notes.org#create-a-tensorflow-machine-from-scratch--ec2-instance) before the class. (Don't forget to shut it down once you've started it: cost of running it is 65c/hour.) If AWS stops you from creating it, request a limit increase (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html#request-increase), and mention this class in the request.

Photo of Cambridge Artificial Intelligence Meetup group
Cambridge Artificial Intelligence Meetup
See more events
MIT Room 4-237
77 Massachusetts Ave · Cambridge, MA