Generative Modelling using Python : An introduction to GAN's and VAE's

Vishnu Sashank (~vishnu59)




"What I cannot create, I do not understand” — Richard Feynman

Generating a desired distribution from a Gaussian distribution is possible even with using simpler models. These models need not be learnt but can also be "hard-coded" as shown in the figure below.

However, generating a sample from relatively complex distribution such as image of an animal is possible only when we use a learnt model. The aim of this workshop is to describe the models which address these problems.

That is, given a lot of data instances, can we learn a useful underlying representation of the data that helps us in generating more samples of the same kind?

This is one of the questions that has fascinated statisticians and computer scientists for the past five decades. The invention of generative modelling frameworks such as Restricted Boltzman Machines [ RBMs ] followed by Deep Belief Networks [ DBMs ] has recently renewed the interest in this field.

This workshop is intended to make the participants familiar with the two most popular and contemporary generative models, Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs). Over a duration of 3 hrs, we will introduce the basic theory and have hands-on workshops covering these topics.

The workshop schedule consists of 6 sub sessions [ 3 presentations + 3 hands on sessions ] as follows :-

Introduction to Generative Modelling (15 minutes) [ Vishnu ] -

  • Introduction to Generative Modelling
  • Motivation to use GANs and VAEs

Hands on Session 1 - Introduction (15 minutes) [ All ]

  • "Hard-coding" your own generative model

Introduction to Variational Autoencoders (VAEs) ( 30 minutes ) [ Lovish ] -

  • Introduction to Latent Variable Models
  • Understanding Variational Inference
  • How the problem is formulated as an autoencoder ?
  • Backpropagating through a stochastic neuron using reparamatrization trick

Hands on Session 2 - VAEs (30 minutes) [ All ]

  • Variational Inference
  • Experiments with Auto-Encoder

Introduction to Generative Adversarial Networks (GANs) ( 30 minutes ) [ Rahul ] -

  • Introduction to adversarial framework and explanation of adversarial loss functions
  • Overview of training a GAN
  • Deep Convolutional GAN, a popular architecture for training

Hands on Session 3 - GANs (30 minutes) [ All ]

  • Experiments with GANs

Conclusion and Comparison (30 minutes) [ Vishnu ]

  • Which model to use for a particular problem ?
  • How can generative models help you apart from creating beautiful images ?

Hands on sessions will have notebooks with the skeleton code provided. The attendees will have to write the missing code snippets reinforcing their understanding of the topic. Participants need not worry about installing any libraries as Docker image will be provided.

Apart from understanding these models, an important motive behind conducting this workshop at PyCon is to explore the tools provided in various python libraries that simplify the implementation of these complex models.

Infact, both these models have already been used in production [ eCommerce GAN by Amazon]. We believe that people from both industry and academia can benefit from this workshop.


Familiarity with the basics concepts of machine learning
Probability [ Bayes rule etc. ]
Fundamentals of high school calculus.

Content URLs:

Notebooks [ Work in Progress ] - Link
Slides for VAEs [ Work in Progress ] - Link
Slides for GANs [ Work in Progress ] - Link

Speaker Info:

Lovish graduated in with a dual degree in computer science and engineering from IIT Kanpur in 2015. He returned to academia in 2017 to pursue his passion for research and teaching. He is working on a research problem closely linked to generative adversarial networks. Recently, he took a seminar on "Linear Algebra for ML” at the 3rd Summer School on Machine Learning: Advances in Modern AI. [ Link ]

Rahul graduated from IIT Madras in 2018. He has used generative models for some weekend hacks such as body2body [ Link ].

Vishnu graduated from Symbiosis International University, Pune in 2017. He current work on visual servoing explores the conjunction of vision and robotics with learning models.

Currently, all of them are Research Fellows at Centre of Visual Information Technology in IIIT Hyderabad. Needless to say, all three of them love python and have used it for both research and development projects. This workshop is our way to give back to this wonderful community.

Speaker Links:

Lovish - Github
Rahul - Github
Vishnu - Github

Section: Data science
Type: Workshops
Target Audience: Intermediate
Last Updated:

Looks like this proposal falls under the section "Data Science". Could you please update the section to that?

Anand Chitipothu (~anandology)

Login to add a new comment.