Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created December 13, 2019 15:54
Show Gist options
  • Save mdfarragher/b0ff84a482bcac78d040e8b806b5d70e to your computer and use it in GitHub Desktop.
Save mdfarragher/b0ff84a482bcac78d040e8b806b5d70e to your computer and use it in GitHub Desktop.
// get a misleading batch: all fake images but labelled as real
var misleadingBatch = Gan.GetMisleadingBatch(gan, batchSize, latentDimensions);
// train the gan
var ganResult = ganTrainer.TrainBatch(
new[] {
(gan.Arguments[0], misleadingBatch.featureBatch),
(labelVar, misleadingBatch.labelBatch)
}, true);
// the rest of the code goes here...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment