January 09, 09:15

Using nargs

Wrote about this a year ago.

Forgot about it, a friend reminded me.

You can pass lists to the python command line arguments.

parser.add_argument('--classifier_conf', default=[512, 2048, 5005], nargs='+', type=int)

and then just add params to your call as follows

--classifier_conf 512 2048 5005

#deep_learning