Coder Social home page Coder Social logo

captaine / deep-unsupervised-learning Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 9.25 MB

Pytorch implementatiions of the Homeworks in course CS294-158

Jupyter Notebook 100.00%
pixelcnn made generative-models cs294-158 uc-berkeley unsupervised-learning flow gan vae

deep-unsupervised-learning's Introduction

Deep-Unsupervised-Learning

Pytorch implementatiions of the Homeworks in course CS294-158

Here you can find PyTorch implementations of a Masked Autoencoder for Distribution Estimation, PixelCNN, RealNVP and other architectures that are used in course.

Homework 1

For the first homework there is a PyTorch implementation of PixelCNN-MADE

That is a auto-regressive model, which mixes ideas from the two papers Pixel Recurrent Neural Networks (2016) and MADE: Masked Autoencoder for Distribution Estimation (2015) to produce colored 28x28 MNIST digits. Pixel intensities have been quantized to 2 bits (i.e. four intensities for each color channel). The dataset can be downloaded from here.

Training data

I have used 60,000 quantized 28x28 images from the colored MNIST dataset. Here's a few samples from the training set:

TrainingSet

Examples

After 50 epochs of training, a network consisting of 12 residual blocks - see Deep Residual Learning for Image Recognition (2015) - followed by a 3-layer MADE generates samples like the following:

Example

You are very welcome to extend the code however you like. If you produce anything cool, be sure to let me know!

Homework 2

For the second homework we implement RealNVP coupling layers for modelling flows

Training data

Here I have used 5000 datapoints sampled from this distribution:

TrainingSet

Example

After 500 epochs we can sample the following face

Example

with this fancy latent space

Latent space face

and density plot density plot

We also implement RealNVP(https://arxiv.org/abs/1605.08803) to achive these results:

realnvp

Homework 3

We implement a VAE with a gated shortcur connection(https://arxiv.org/pdf/1612.08083) and train it on the SVHN dataset.

The final results look like this: done_training

Homework 4

In the 4th homework we implement the Wasserstein GAN(https://arxiv.org/abs/1704.00028) and draw inspiration from the architecture used in SN-GAN(https://arxiv.org/abs/1802.05957)

This we for 80 K iteration and the training curves and mean inception score look like the following: Training curve Inception_Score

And the resulting samples:

Samples

deep-unsupervised-learning's People

Contributors

captaine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cs-mlcourses

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.