Created
March 12, 2020 16:22
-
-
Save grohith327/3a356aa8cdd05dab1f624050017e164e 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.gan import Pix2Pix | |
## Create an object | |
gan = Pix2Pix() ## Customize the model by specifying parameters for Pix2Pix object | |
## Load the training and testing data | |
train_ds, test_ds = gan.load_data(use_edges2handbags = True, batch_size = 32) | |
## Get samples from training data | |
train_samples = gan.get_sample(data= train_ds, n_samples = 2) | |
## Get samples from testing data | |
train_samples = gan.get_sample(data= test_ds, n_samples = 2) | |
## train the model | |
gan.fit(train_ds, test_ds, epochs = 200) | |
## 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