Code Monkey home page Code Monkey logo

discretevae's Introduction

Discrete VAE

This code requires version 0.4.0 of pytorch.

This code trains a VAE on BinaryMNIST based on https://github.com/pytorch/examples/tree/master/vae

1. VAE

To train a classic VAE with continuous latent variables:

python train_vae.py

2. REINFORCE VAE

To train a VAE with reinforce (20 latent variables with each 256 categories):

python train_reinforce_vae.py

3. Gumbel-Softmax VAE

To train a VAE with reinforce (20 latent variables with each 256 categories):

python train_gumbel_vae.py

discretevae's People

Contributors

hugobb avatar

Stargazers

Jinke He avatar Chao Han avatar Arihant Tripathi avatar HaohongZhang avatar Chiruno avatar CloudChen avatar Julian Francis avatar Insu Jeon avatar  avatar Brian Fitzgerald avatar Zeming Fang avatar Andreas Köpf avatar Ruibin Mao avatar ykachin avatar Masataro Asai avatar Carsten Ditzel avatar HQ avatar Guan'an Wang avatar Thomas Lautenschläger avatar Aleksandr (Sasha) Berezutskii avatar  avatar  avatar

Forkers

xinleiniu

discretevae's Issues

About loss function of discrete reinforce vae

I just start to learn VAE and try to preform some code about VAE with discrete latent variable. I don't know how to write the loss function , and I find your way :
Loss function.
Is it a standard method? Any trick here? Could you explain it or just give me some material. Thanks a lot.

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.