Skip to content

Instantly share code, notes, and snippets.

@grohith327
Last active March 12, 2020 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grohith327/431a0929b90f36f46a397d6f0051891c to your computer and use it in GitHub Desktop.
Save grohith327/431a0929b90f36f46a397d6f0051891c to your computer and use it in GitHub Desktop.
from simplegan.autoencoder import ConvolutionalAutoencoder
## Create an object
autoenc = ConvolutionalAutoencoder() ## Modify the architecture of the model by specifying parameters
## Load the MNIST data
train_ds, test_ds = autoenc.load_data(use_mnsist = True)
## Get samples from the loaded training data to view them
train_samples = autoenc.get_sample(data = train_ds, n_samples = 2)
## Get samples from the loaded testing data to view them
test_samples = autoenc.get_sample(data = test_ds, n_samples = 2)
## Train the model
autoenc.fit(train_ds = train_ds, epochs = 5, save_model = './')
## Generate samples after training the model
generated_samples = autoenc.generate_samples(test_ds = test_ds.take(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment