Skip to content
/ vae Public

Variational autoencoders implemented in Tensorflow.

License

Notifications You must be signed in to change notification settings

ondrejbiza/vae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Variational Autoencoders in Tensorflow

vae_mnist_samples vae_mnist_losses

Set up

  • Install Python >= 3.6.
  • Install packages in requirements.txt.
  • Tested with tensorflow-gpu 1.7.0 (CUDA 9.1, cuDNN 7.1) and tensorflow-gpu 1.14.0 (CUDA 10.0, cuDNN 7.6).
  • For tensorflow-gpu 1.14.0, use the flag --fix-cudnn if you get a cuDNN initialization error.

Usage

Autoencoder:

# ConvNet on MNIST
python -m vae.scripts.ae_conv_mnist

MNIST, default settings: -54.26 test log-likelihood (1 run)

Variational Autoencoder (VAE):

# ConvNet on MNIST
python -m vae.scripts.vae_conv_mnist

# fully-connected net on MNIST
python -m vae.scripts.vae_fc_mnist

Paper: https://arxiv.org/abs/1312.6114

MNIST, ConvNet, default settings: -71.52 test log-likelihood (1 run)

VampPrior VAE:

# ConvNet on MNIST
python -m vae.scripts.vampprior_vae_conv_mnist

# fully-connected net on a toy dataset
python -m vae.scripts.vampprior_vae_fc_toy

Paper: https://arxiv.org/abs/1705.07120

MNIST, default settings: -70.08 test log-likelihood (1 run)

Gaussian Mixture Prior VAE:

# ConvNet on MNIST
python -m vae.scripts.gmprior_vae_conv_mnist

# fully-connected net on a toy dataset
python -m vae.scripts.gmprior_vae_fc_toy

Baseline from https://arxiv.org/abs/1705.07120

MNIST, ConvNet, default settings: -69.58 test log-likelihood (1 run)

Softmax-Gumbel VAE:

# ConvNet on MNIST
python -m vae.scripts.sg_vae_conv_mnist

Paper: https://arxiv.org/abs/1611.01144

MNIST, default settings: -81.56 test log-likelihood (1 run)

Vector Quantization VAE (VQ-VAE):

More or less a 1-on-1 copy of https://github.com/hiwonjoon/tf-vqvae/blob/master/model.py:

python -m vae.scripts.vq_vae_fully_conv_mnist

My own version that seems to produce better samples:

python -m vae.scripts.vq_vae_conv_mnist

Paper: https://arxiv.org/abs/1711.00937

I'm not sure how to measure the test log-likelihood here.

Notes

Releases

No releases published

Packages

No packages published

Languages