Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI args #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

CLI args #24

wants to merge 4 commits into from

Conversation

BrandonLMorris
Copy link

Motivation

Out of the box, LeakGAN does not work when specified through main.py. Instead, an error occurs that TensorFlow flags doesn't know how to parse argument 'g'. This is due to the fact that main.py parses arguments with getopt, but the LeakGAN constructor uses tf.app.flags.

Changes

To get LeakGAN to work properly, I modified main.py to also utilize tf.app.flags. Since these flags are intended to be global and distributed, it's perfectly legal to have flags specified in different parts of the system (i.e. LeakGAN specific args only in the LeakGAN constructor). The overall functionality is identical, with the exception that main.py args need to use their longform version (e.g. --gan_type instead of just -g).

Additionally, I factored out the definitions of the test_file, oracle_file, and generator_file to the Gan class (since they were used by every GAN type), and made them able to be specified by CLI args as well.

@hija
Copy link

hija commented Nov 29, 2018

Additionally, this fixes a bug in the current implementation, in which the -h command states, that you should use "-t realdata", while it's "-t real" instead.

Copy link

@un1crom un1crom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would love for project maintainers/owners to accept these changes. i am happy to!

@liyzcj
Copy link

liyzcj commented May 7, 2019

the args defined in leakGan's constructer can not be use as this method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants