Skip to content

Instantly share code, notes, and snippets.

@grohith327
Created March 12, 2020 16:22
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/3a356aa8cdd05dab1f624050017e164e to your computer and use it in GitHub Desktop.
Save grohith327/3a356aa8cdd05dab1f624050017e164e to your computer and use it in GitHub Desktop.
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