lucylu-lol / VAE

Implementation of VAE and CVAE using Pytorch on MNIST dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VAE generate results

Sample 100 latent codes from normal distribution and input them into the trained decoder:

generate_from_vae

CVAE generate results

Sample 100 latent codes from normal distribution and select the label of which image you want to generate, and then concat them to input into trained decoder:

The expected label is 1:

generate_from_cvae_with_label_1

The expected label is 9:

generate_from_cvae_with_label_9

Note

If you adjust the hyper-parameters carefully (such as the structure of the neural network, the dim of latent or the times of train), the results may be better.

About

Implementation of VAE and CVAE using Pytorch on MNIST dataset

License:MIT License


Languages

Language:Python 100.0%