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

How can we define a list of integers? #131

Open
llan-ml opened this issue Mar 2, 2020 · 1 comment
Open

How can we define a list of integers? #131

llan-ml opened this issue Mar 2, 2020 · 1 comment

Comments

@llan-ml
Copy link

llan-ml commented Mar 2, 2020

In many cases, we need pass a list integers to a program, such as a list containing the number of units per layer in a neural network.

For now, with DEFINE_list, we have to manually change the type of each element from string to int. And DEFINE_multi_integer may lead to a very long command line string since the argument name needs to appear multiple times.

Is it possible or easy to declare a default type of each element for DEFINE_list, like argparse?

@yilei
Copy link
Contributor

yilei commented Mar 2, 2020

We currently don't support such flag type, and you need to use DEFINE_list and use a helper function to do the conversion as you mentioned.

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