Coder Social home page Coder Social logo

beta-vae's Introduction

β-VAE

Pytorch reproduction of two papers below:

  1. β-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework, Higgins et al., ICLR, 2017
  2. Understanding disentangling in β-VAE, Burgess et al., arxiv:1804.03599, 2018

Dependencies

python 3.6.4
pytorch 0.3.1.post2
visdom

Datasets

same with here

Usage

initialize visdom

python -m visdom.server

you can reproduce results below by

sh run_celeba_H_beta10_z10.sh
sh run_celeba_H_beta10_z32.sh
sh run_3dchairs_H_beta4_z10.sh
sh run_3dchairs_H_beta4_z16.sh
sh run_dsprites_B_gamma100_z10.sh

or you can run your own experiments by setting parameters manually.
for objective and model arguments, you have two options H and B indicating methods proposed in Higgins et al. and Burgess et al., respectively.
arguments --C_max and --C_stop_iter should be set when --objective B. for further details, please refer to Burgess et al.

e.g.
python main.py --dataset 3DChairs --beta 4 --lr 1e-4 --z_dim 10 --objective H --model H --max_iter 1e6 ...
python main.py --dataset dsprites --gamma 1000 --C_max 25 --C_stop_iter 1e5 --lr 5e-4 --z_dim 10 --objective B --model B --max_iter 1e6 ...

check training process on the visdom server

localhost:8097

Results

3D Chairs

sh run_3dchairs_H_beta4_z10.sh

3dchairs_beta4_z16

sh run_3dchairs_H_beta4_z16.sh

3dchairs_beta4_z16

CelebA

sh run_celeba_H_beta10_z10.sh

celeba

sh run_celeba_H_beta10_z32.sh

celeba

dSprites

sh run_dsprites_B.sh
visdom line plot

dsprites_plot

latent traversal gif(--save_output True)

##### reconstruction(left: true, right: reconstruction)

Reference

  1. β-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework, Higgins et al., ICLR, 2017
  2. Understanding disentangling in β-VAE, Burgess et al., arxiv:1804.03599, 2018
  3. Github Repo: Tensorflow implementation from miyosuda

beta-vae's People

Contributors

1konny avatar tonymetger 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.