Skip to main content

Framework to ease training of generative models based on TensorFlow

Project description


License Documentation Status

Framework to ease training of generative models

SimpleGAN is a framework based on TensorFlow to make training of generative models easier. SimpleGAN provides high level APIs with customizability options to user which allows them to train a generative model with few lines of code.


Make sure you have the following packages installed


Latest stable release:

  $ pip install simplegan

Latest Development release:

  $ pip install git+

Getting Started

>>> from simplegan.gan import DCGAN
>>> gan = DCGAN()
>>> train_ds = gan.load_data(use_mnist = True)
>>> samples = gan.get_sample(train_ds, n_samples = 5)
>>> = train_ds)
>>> generated_samples = gan.generate_samples(n_samples = 5)
Convolutional Autoencoder
>>> from simplegan.autoencoder import ConvolutionalAutoencoder
>>> autoenc = ConvolutionalAutoencoder()
>>> train_ds, test_ds = autoenc.load_data(use_cifar10 = True)
>>> train_sample = autoenc.get_sample(data = train_ds, n_samples = 5)
>>> test_sample = autoenc.get_sample(data = test_ds, n_samples = 1)
>>> = train_ds, epochs = 5, optimizer = 'RMSprop', learning_rate = 0.002)
>>> generated_samples = autoenc.generate_samples(test_ds = test_ds.take(1))

To have a look at more examples in detail, check here


Check out the docs page

Provided models

  • Autoencoders
    • Vanilla Autoencoder
    • Convolutional Autoencoder
    • Variational Autoencoder [Paper]
    • Vector Quantized - Variational Autoencoder [Paper]
  • Generative Adversarial Networks(GANs)


We appreciate all contributions. If you are planning to perform bug-fixes, add new features or models, please file an issue and discuss before making a pull request.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for simplegan, version 0.2.8
Filename, size File type Python version Upload date Hashes
Filename, size simplegan-0.2.8-py3-none-any.whl (57.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size simplegan-0.2.8.tar.gz (27.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page