Skip to content

VMBoehm/vae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VAE

a tensorflow implementation of a vanilla Variational AutoEncoder (VAE) [1,2] with support for several standard datasets

What is supported?

Datasets

Likelihood types

  • Bernoulli
  • Gaussian

Network types

  • fully connected
  • convolutional

Misc

  • The VAE can be trained on subsets with a specific label by specifying the 'class_label' flag.
  • The VAE can be trained without the 'V' that is as an AutoEncoder by setting the 'AE' flag.
  • there's a number of regularization options available for the fully connected network (dropout, L2 regularization on network weights)
  • data augmentation is posisble by adding noise or image rotations

Installation

To install, either download the repo and run

pip install -e .

or run

pip install git+https://github.com/VMBoehm/vae

Usage

To see all available settings, simply run

python main.py --helpfull

Example

python main.py --data_set='mnist' --latent_size=8 --network_type='conv'

will run a VAE on the mnist dataset with a latent space dimensionality of 8 and (de)convolutional networks as generator/encoder.

Outputs

The code automatically saves checkpoints and exports the trained model. During the training, several summaries can be visualized with tensorboard:

tensorboard --logdir='./model/'

e.g. mnist reconstructions with a Gaussian likelihood, a latent space dimensionality of 8 and a fully connected network

recons

and corresponding samples

samples

TF2 compatibility

A tensorflow 2.0 compatible version is available in the tf2 branch

About

a vanilla Variational AutoEnocder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors