diff --git a/ppgan/utils/options.py b/ppgan/utils/options.py index e87477af0ca867e1d53d0d64ae9249e9ca2f1a1d..32572c4032168d0398cc4284a507187d072ea20e 100644 --- a/ppgan/utils/options.py +++ b/ppgan/utils/options.py @@ -45,10 +45,10 @@ def parse_args(): default=False, help='skip validation during training') # config options - parser.add_argument('opts', - help='See config for all options', - default=None, - nargs=argparse.REMAINDER) + parser.add_argument("-o", + "--opt", + nargs='+', + help="set configuration options") #for inference parser.add_argument("--source_path", diff --git a/tools/main.py b/tools/main.py index 7d40c11c5b4b93ae9cd4678909efc8b4526dedde..b7e2b82607401d87fa6b2309528e776d2f0f2f92 100644 --- a/tools/main.py +++ b/tools/main.py @@ -51,6 +51,6 @@ def main(args, cfg): if __name__ == '__main__': args = parse_args() - cfg = get_config(args.config_file) + cfg = get_config(args.config_file, args.opt) main(args, cfg)