Dump training config similar to mmdet. (#410)
parent
c2f4be1c8a
commit
e826153b2d
|
@ -143,6 +143,9 @@ def main():
|
||||||
# create work_dir
|
# create work_dir
|
||||||
mmcv.mkdir_or_exist(osp.abspath(cfg.work_dir))
|
mmcv.mkdir_or_exist(osp.abspath(cfg.work_dir))
|
||||||
|
|
||||||
|
# dump config
|
||||||
|
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
|
||||||
|
|
||||||
# init the logger before other steps
|
# init the logger before other steps
|
||||||
timestamp = time.strftime('%Y%m%d_%H%M%S', time.localtime())
|
timestamp = time.strftime('%Y%m%d_%H%M%S', time.localtime())
|
||||||
log_file = osp.join(cfg.work_dir, f'train_{timestamp}.log')
|
log_file = osp.join(cfg.work_dir, f'train_{timestamp}.log')
|
||||||
|
|
Loading…
Reference in New Issue