Skip to content

Auto-Encoding Variational Bayes Implementation

Notifications You must be signed in to change notification settings

dungxibo123/vae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto-Encoding Variational Bayes

Original Paper: link

Installation

  • Recommend using an virtual environment to run
pip install -r requirements.txt

Run

Data set

Go to Kaggle MNIST Dataset and download Extract data file to get mnist.matdata file.

For Linux Shell
unzip archive.zip 

Start to train the encoder and decoder

usage: python train.py [-h] -d DATA [-hd HIDDEN] [-ld LATENT] [-lr LEARNING] [-e EPOCHS] [-b BATCH_SIZE] [-m MODEL]

optional arguments:
  -h, --help            show this help message and exit
  -d DATA, --data DATA  path/to/train/data
  -hd HIDDEN, --hidden HIDDEN
                        number of hidden unit
  -ld LATENT, --latent LATENT
                        number of latent unit
  -lr LEARNING, --learning LEARNING
                        learning rate
  -e EPOCHS, --epochs EPOCHS
                        epochs
  -b BATCH_SIZE, --batch_size BATCH_SIZE
                        Batch size
  -m MODEL, --model MODEL
                        path/to/model/saving/location

After training

# Model class must be defined somewhere
model = torch.load("path/to/model/file/located")
model.eval()

About

Auto-Encoding Variational Bayes Implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published