Skip to content

Train a deep convolutional generative adversarial network to generate mnist data

Notifications You must be signed in to change notification settings

habrman/keras-dcgan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Keras dcgan

Train a deep convolutional generative adversarial network to generate mnist like data.

Dependencies

  • tensorflow
  • tqdm
  • imageio

How to

There's two training scripts in the folder train.

  1. train-mnist-dcgan.py Train a gan to generate mnist like images. It's provided as a simple example where the user doesn't need to provide the data set. It imports the mnist data set using keras. Run it with python3 train/train-mnist-dcgan.py.
  2. train-dcgan.py Train a gan using your own data set. The size of the generated images is 32x32 so make sure your data set does not contain small details since the real data will be resized to 32x32 when training the discriminator. Run it with python3 train/train-dcgan.py -d <your data folder> where <your data folder> should contain your image data set in .png or .jpg format.

Both scripts create an output folder containing models for each epoch, predictions for each 100 step and tensorboard logs with generator and discriminator loss for each training step. Both of them also provide input parameters for input size, batch size, number of training epochs and output directory that can be used.

Network structure

alt text

MNIST training evolution

alt text

Fashion MNIST training evolution

alt text

About

Train a deep convolutional generative adversarial network to generate mnist data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages