All Projects → ermongroup → Variational Ladder Autoencoder

ermongroup / Variational Ladder Autoencoder

Implementation of VLAE

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Variational Ladder Autoencoder

Awesome Vaes
A curated list of awesome work on VAEs, disentanglement, representation learning, and generative models.
Stars: ✭ 418 (+113.27%)
Mutual labels:  unsupervised-learning, generative-model, representation-learning, variational-inference
srVAE
VAE with RealNVP prior and Super-Resolution VAE in PyTorch. Code release for https://arxiv.org/abs/2006.05218.
Stars: ✭ 56 (-71.43%)
Mutual labels:  generative-model, representation-learning, unsupervised-learning
ladder-vae-pytorch
Ladder Variational Autoencoders (LVAE) in PyTorch
Stars: ✭ 59 (-69.9%)
Mutual labels:  representation-learning, unsupervised-learning, variational-inference
Bagofconcepts
Python implementation of bag-of-concepts
Stars: ✭ 18 (-90.82%)
Mutual labels:  unsupervised-learning, representation-learning
Deep Generative Models For Natural Language Processing
DGMs for NLP. A roadmap.
Stars: ✭ 185 (-5.61%)
Mutual labels:  generative-model, variational-inference
Simclr
PyTorch implementation of SimCLR: A Simple Framework for Contrastive Learning of Visual Representations
Stars: ✭ 750 (+282.65%)
Mutual labels:  unsupervised-learning, representation-learning
Php Ml
PHP-ML - Machine Learning library for PHP
Stars: ✭ 7,900 (+3930.61%)
Mutual labels:  unsupervised-learning, feature-extraction
Transferlearning
Transfer learning / domain adaptation / domain generalization / multi-task learning etc. Papers, codes, datasets, applications, tutorials.-迁移学习
Stars: ✭ 8,481 (+4227.04%)
Mutual labels:  representation-learning, unsupervised-learning
Self Supervised Learning Overview
📜 Self-Supervised Learning from Images: Up-to-date reading list.
Stars: ✭ 73 (-62.76%)
Mutual labels:  unsupervised-learning, representation-learning
Paysage
Unsupervised learning and generative models in python/pytorch.
Stars: ✭ 109 (-44.39%)
Mutual labels:  unsupervised-learning, generative-model
Pointglr
Global-Local Bidirectional Reasoning for Unsupervised Representation Learning of 3D Point Clouds (CVPR 2020)
Stars: ✭ 86 (-56.12%)
Mutual labels:  unsupervised-learning, representation-learning
Bcpd
Bayesian Coherent Point Drift (BCPD/BCPD++); Source Code Available
Stars: ✭ 116 (-40.82%)
Mutual labels:  unsupervised-learning, variational-inference
Simclr
SimCLRv2 - Big Self-Supervised Models are Strong Semi-Supervised Learners
Stars: ✭ 2,720 (+1287.76%)
Mutual labels:  unsupervised-learning, representation-learning
Unsupervised Classification
SCAN: Learning to Classify Images without Labels (ECCV 2020), incl. SimCLR.
Stars: ✭ 605 (+208.67%)
Mutual labels:  unsupervised-learning, representation-learning
Variational Autoencoder
Variational autoencoder implemented in tensorflow and pytorch (including inverse autoregressive flow)
Stars: ✭ 807 (+311.73%)
Mutual labels:  unsupervised-learning, variational-inference
Lemniscate.pytorch
Unsupervised Feature Learning via Non-parametric Instance Discrimination
Stars: ✭ 532 (+171.43%)
Mutual labels:  unsupervised-learning, representation-learning
Discogan Pytorch
PyTorch implementation of "Learning to Discover Cross-Domain Relations with Generative Adversarial Networks"
Stars: ✭ 961 (+390.31%)
Mutual labels:  unsupervised-learning, generative-model
Dragan
A stable algorithm for GAN training
Stars: ✭ 189 (-3.57%)
Mutual labels:  unsupervised-learning, generative-model
Contrastive Predictive Coding
Keras implementation of Representation Learning with Contrastive Predictive Coding
Stars: ✭ 369 (+88.27%)
Mutual labels:  unsupervised-learning, representation-learning
Disentangling Vae
Experiments for understanding disentanglement in VAE latent representations
Stars: ✭ 398 (+103.06%)
Mutual labels:  unsupervised-learning, representation-learning

Implementation of Variational Ladder Autoencoder

This is the implementation of the Variational Ladder Autoencoder. Training on this architecture with standard VAE disentangles high and low level features without using any other prior information or inductive bias. This has been successful on MNIST, SVHN, and CelebA.

LSUN is a little difficult for VAE with pixel-wise reconstruction loss. However with another recently work we can generate sharp results on LSUN as well. This architecture serve as the baseline architecture for that model.

Training with Default Options

Setup

You need to have the following

  • python 2 or 3 (More stable on python 2)
  • tensorflow (tested on 0.12)
  • numpy, scipy, matplotlib

MNIST

You don't need to prepare the dataset for MNIST if you installed the examples that come with standard tensorflow distributions. If you can import tensorflow.examples.tutorials.mnist then simply run

python main.py --dataset=mnist

You should see results like this

vladder_mnist

Where if we sample one layer on a grid, and other layers randomly, we can see that the bottom layer represents stroke width, middle layer represents digit width, and top layer digit identity. Note that we cannot fully decouple them because digit identity is correlated with digit width (There is not really a '1' that is wide)

SVHN

For SVHN download the dataset from http://ufldl.stanford.edu/housenumbers/

Download the three files train_32x32.mattest_32x32.mat , extra_32x32.mat and place them into a folder and pass the absolute path of this folder as the db_path argument. Run

python main.py --dataset=svhn --db_path=/path/to/svhn/dataset

You should see decoupling like below

vladder_svhn

where we sample one layer randomly holding other layers fixed. The model has learned to disentangle color, digit variations, digit identity and general style.

CelebA

For CelebA download the dataset from http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html

Download the aligned and cropped version, unzip into a folder, and pass the path of that folder as db_path argument. Note that your db_path folder should directly contain all the image files without any additional nesting. You folder should look like this

celeba_dataset_illustratoin

Now you can train by running

python main.py --dataset=celebA --db_path=/path/to/celebA/dataset

You should see decoupling like below

vladder_celebA

Additional Options

  • To use another type of regularization use --reg=[reg]. Currently support --reg=kl for KL(q(z|x)||p(z)) and --reg=mmd for MMD(q(z), p(z)).
  • To use a particular GPU/GPUs add option --gpus=[ids] such as --gpus=0,1 to use GPU 0 and 1. In general for any of the recommended datasets the network generates good samples after running for about an hour on a single Titan X. The visualizations in the paper are produced after 1-2 days of training, but the improvement becomes marginal after the initial few hours.
  • To use other architectures other than default, use --netname=[name]. For supported architectures please refer to code. The name is the unique identifier for a network configuration, and all related training log, visualizations, and checkpoint files, etc will be stored in the directory $pwd/model/netname. For example, to run visualization with tensorboard use tensorboard --logdir=[that directory].
  • To also visualize the training process with a GUI window add --use_gui. By default all plots will be stored to network directory, this will also plot them in a window in addition to that.
  • To change batch size, add --batch_size=[size]
  • To visualize and plot the autoencoding reconstruction of the model, add --plot_reconstruction
  • To add Gaussian and salt and pepper noise to perform denoise training add --denoise_train
  • To control the number of batches before we visualize and make plots, use --vis_frequency=[num_batch]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].