MCPcopy Create free account
hub / github.com/SooLab/CGFormer / get_parser

Function get_parser

train.py:34–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def get_parser():
35 parser = argparse.ArgumentParser(
36 description='Pytorch Referring Expression Segmentation')
37 parser.add_argument('--config',
38 default='path to xxx.yaml',
39 type=str,
40 help='config file')
41 parser.add_argument('--opts',
42 default=None,
43 nargs=argparse.REMAINDER,
44 help='override some settings in the config.')
45
46 args = parser.parse_args()
47 assert args.config is not None
48 cfg = config.load_cfg_from_cfg_file(args.config)
49 if args.opts is not None:
50 cfg = config.merge_cfg_from_list(cfg, args.opts)
51 return cfg
52
53
54@logger.catch #在子线程或主线程中捕获异常

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected