Skip to content

TensorFlow 2.0 implementations of various autoencoders.

Notifications You must be signed in to change notification settings

akudan/Autoencoders-tf2.0

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto-Encoders for MNIST: TF 2.0

Implementations of AE(Auto-Encoder), VAE(Variational AE) and CVAE(Conditional VAE)

Results

AE(Auto-Encoder)

python run_main.py --ae_type AE --num_epochs 150 --latent_dim 2
Reconsructed Image
Distribution of z

VAE(Variational Auto-Encoder)

python run_main.py --ae_type VAE --num_epochs 150 --latent_dim 2
Reconsructed Image
Distribution of z

CVAE(Conditional Variational Auto-Encoder)

python run_main.py --ae_type CVAE --num_epochs 150 --latent_dim 2
Reconsructed Image
Distribution of z

More Conceptual Plots

VAE

Visualizations of generated images from (z_1, z_2) ∈ [-2, 2] uniform distribution.

CVAE

Visualizations of generated images from z_1=0, and z_2 ∈ [-3, 3] uniform distribution.

Usage

Prerequisites

  1. tensorflow 2.0.0-alpha0 or higher
  2. python packages: numpy, matplotlib

Command

python run_main.py --ae_type <autoencoder_type>

Example: python run main.py --ae_type AE

Arguments

Required:

  • --ae_type: Type of autoencoder, must be in ['AE', 'VAE', 'CVAE']

Optional:

  • --latent_dim: Dimension of latent vector(z). Default: 2
  • --num_epochs: The number of epochs to run. Default: 100
  • --batch_size: The size of batch. Default: 1000
  • --learn_rate: Learning rate of Adam optimizer. Default: 1e-4

References

[1] https://github.com/hwalsuklee/tensorflow-mnist-VAE
[2] https://www.slideshare.net/NaverEngineering/ss-96581209
[3] https://www.tensorflow.org/alpha/tutorials/generative/cvae

About

TensorFlow 2.0 implementations of various autoencoders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%