Git Product home page Git Product logo

mat-vae's Introduction

Variational Auto-Encoder in MATLAB

This is a re-implementation of Auto-Encoding Variational Bayes in MATLAB.

Installation

Data

I use the MNIST from: https://github.com/y0ast/VAE-Torch/tree/master/datasets.

Toolbox

Please install my fork of MatConvNet, where I implemented some new layers, including:

  • KLD.m: handles forward and backward propagation of KL Divergence
  • NLL.m: handles forward and backward propagation of Negative Log-Likelihood (works for multi-variate Bernoulli distribution)
  • LB.m: combine KLD and NLL into a lower bound
  • Sampler.m: sampling operation
  • Tanh.m: tanh non-linearity
  • Split.m: split one variable into multiple while keeping the same spatial size

Usage

Training

For training, please see train_script.m on how I trained models. I implemented four stochastic gradient descent algorithms:

  • SGD with momentum
  • ADAM
  • ADAGRAD
  • RMSPROP

Demo

For demo, I have four demo scripts for visualization under demo/, which are:

  • manifold_demo.m: visualize the manifold of a 2d latent space in image space.
  • sample_demo.m: sample from latent space and visualize in image space.
  • reconstruct_demo.m: visualize a reconstructed version of an input image.
  • walk_demo.m: randomly sample a list of images, and compare the morphing process done in both image space and latent space.

More

To learn about how VAE works under the hood, refer to the original paper or my writeup.

mat-vae's People

Watchers

 avatar

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.