victoresque / pytorch-template

PyTorch deep learning projects made easy.
MIT License
4.75k stars 1.09k forks source link

In test.py i face error. #51

Closed EzoBear closed 5 years ago

EzoBear commented 5 years ago

test.py code : args = parser.parse_args() config = ConfigParser(args) origin code config = ConfigParser(parser) proposal code main(config, args.resume)

class ConfigParser: def init(self, args, options='', timestamp=True):

parse default and custom cli options

    for opt in options:
        args.add_argument(*opt.flags, default=None, type=opt.type)
    **args = args.parse_args()**

In args = args.parse_args(), args is result of parser.parse_args() so i occurred error. so i proposal changing ConfigParser(args) to ConfigParser(parser) in test.py

SunQpark commented 5 years ago

Fixed in PR #52. Thank you for reporting, @EzoBear.