From 3db38fce8ba88bd68a51a5e0232d60eeac7c50d1 Mon Sep 17 00:00:00 2001 From: zchen0211 Date: Wed, 4 Oct 2017 16:14:08 -0700 Subject: [PATCH] gan design new version --- doc/design/gan_api.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/doc/design/gan_api.md b/doc/design/gan_api.md index 8521bc8bf2..e0e3440d49 100644 --- a/doc/design/gan_api.md +++ b/doc/design/gan_api.md @@ -14,21 +14,18 @@ Borrow this photo from the original DC-GAN paper. ## The Conditional-GAN might be a class. This design we adopt the popular open source design in https://github.com/carpedm20/DCGAN-tensorflow and https://github.com/rajathkmp/DCGAN. It contains following data structure: -### DCGAN(object): -which contains everything required to build a GAN model. It provides following member functions methods as API: +- DCGAN(object): which contains everything required to build a GAN model. It provides following member functions methods as API: -### __init__(...): -Initialize hyper-parameters (like conv dimension and so forth), and declare model parameters of discriminator and generator as well. +- __init__(...): Initialize hyper-parameters (like conv dimension and so forth), and declare model parameters of discriminator and generator as well. -### generator(z, y=None): -Generate a fake image from input noise z. If the label y is provided, the conditional GAN model will be chosen. +- generator(z, y=None): Generate a fake image from input noise z. If the label y is provided, the conditional GAN model will be chosen. Returns a generated image. -### discriminator(image): +- discriminator(image): Given an image, decide if it is from a real source or a fake one. Returns a 0/1 binary label. -### build_model(self): +- build_model(self): build the whole GAN model, define training loss for both generator and discrimator. ## Discussion on Engine Functions required to build GAN -- GitLab