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

Trouble finding out command-line arguments #22

Closed
woctezuma opened this issue Feb 24, 2020 · 3 comments
Closed

Trouble finding out command-line arguments #22

woctezuma opened this issue Feb 24, 2020 · 3 comments

Comments

@woctezuma
Copy link

woctezuma commented Feb 24, 2020

I see in the README that there are command-line arguments, such as image-size, and I would like to find out the exhaustive list of possible command-line arguments.

However, I have a bit of trouble understanding the code in stylegan2_pytorch.py. I don't see any main() function. I am familiar with Python, but it seems that you are using it in a way which I don't know about, with that binary file in bin/.

Could you point out where I should look at?

@mulka
Copy link

mulka commented Feb 24, 2020

The file in bin/ is a Python file. At the bottom, it looks like it is using the fire package to call the train_from_folder function in that same file. I'm guessing that using "--help" with the command will give you a list of the options, but you could also look at the arguments to the train_from_folder function as well. Let me know if that helps.

@woctezuma
Copy link
Author

woctezuma commented Feb 24, 2020

The file in bin/ is a Python file.

Thank you! This makes things clearer!

I did not know that the file in bin/ was a text file: I assumed it might be some pre-compiled binary file.

@woctezuma
Copy link
Author

So, Python Fire is a library to generate command-line interfaces.

The list of command-line arguments, and their default values, are given by the train_from_folder() function, as you mentioned:

def train_from_folder(
    data = './data',
    results_dir = './results',
    models_dir = './models',
    name = 'default',
    new = False,
    load_from = -1,
    image_size = 128,
    network_capacity = 16,
    batch_size = 3,
    gradient_accumulate_every = 5,
    num_train_steps = 100000,
    learning_rate = 2e-4,
    num_workers =  None,
    generate = False,
    num_image_tiles = 8
):
    # [...]

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

No branches or pull requests

2 participants