Generative Adversarial Nets – Fresh Machine Learning #2

This episode of Fresh Machine Learning is all about a relatively new concept called a Generative Adversarial Network. A model continuously tries to fool another model, until it can do so with ease. At that point, it can generate novel, authentic looking data! Very exciting stuff.

The demo code for this video is a set of adversarial Gaussian Distribution Curves in Python using Theano and PyPlot:

I introduce two papers in this video

Generative Adversarial Networks:

and the associated code:

Generative Adversarial Text-to-Image Synthesis:

and it’s associated code is here:

Another really cool repo using GANs:

Great explanation of GANs:

Live demo of a GAN:

One more really great description of generative models:

I love you guys! Thanks for watching my videos, I do it for you. I left my awesome job at Twilio and I’m doing this full time now.

I recently created a Patreon page. If you like my videos, feel free to help support my effort here!:

Much more to come so please subscribe, like, and comment.


  1. eranjitkumar11 says:

    Can you then use the trained discriminator (from the GAN model) for
    classification task ? e.g. if you trained a GAN model successfully on the
    mnist datset, the Generative model can generate new digits, but can the
    discriminator be used to classify digits?

  2. SaPear Socks N' Var says:

    Great content. I hope your channel grows very fast because more people need
    to see these awesome videos.

  3. Satwik Kansal says:

    Awesome. From where the training data of generative model is coming in your

  4. Hitesh Vaidya says:

    hi siraj amaing work especially memes and trolls :P. Can you suggest me a
    good online course on machine learning? I want to do project in deep
    learning. However I must first complete basic courses like ML and
    reinforcement learning etc. I am beginner in ML.

  5. Tiffany Zhu says:

    Imagine a Dungeons & Dragons online game where the Dungeon Master’s spoken
    word generates novel game content in real time.

  6. Saikat Basak says:

    Which Beauty and the Geek season were you in? Never seen a geek with as
    much style as yours.

  7. Kush Rustagi says:

    That is insane! I didn’t know networks like GANs existed.
    What I didn’t understand was how the Stanford demo worked. Nevertheless,
    amazing video!

  8. Michael Cho says:

    Freaking awesome intro to GAN! We need more of these to demystify deep
    learning! Subscribed!

  9. shabeer821 says:

    You make awesome set of videos, i have never come across. Specially i like
    the way you explain succinctly a concept and with demo examples. I am Data
    science enthusiast and beginner in ML. I am surprised how do you keep up
    with latest news – do you read the latest research publications ? and how
    much time does it take to make a video – from conception to publishing on
    youtube ?

  10. jcims says:

    Found you on TWiMLAI! I’m a n00b and this was a great explanation. GANs
    seem like close cousins to genetic algorithms with the discriminator
    playing the role of the fitness function. Is there anything stochastic
    about the generator (presuming it’s in a steady state), or will it always
    generate the same output for a given input?

  11. hachimitsuchai says:

    Nice tutorial. Just a little warning: You also need sklearn -> pip install
    sklearn / pip3 install sklearn. Also this script was written in python 2.7
    so if you want to use python 3 you’ll have to do a little syntax updating.

  12. Das Leben ist schön says:

    What I don´t understand: … Are the generator AND the discriminator
    learning unsupervised or do you need to have an already trained
    discriminator and then use this before handly learned info from the
    discriminator as a supervision signal for the generator?

Comments are closed.