Last active
March 12, 2020 16:18
-
-
Save grohith327/431a0929b90f36f46a397d6f0051891c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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