[Fix] Fix bug which breaks `cal_train_time` in `analyze_logs.py`. (#662)
* fix bug mmclassification issues 661 https://github.com/open-mmlab/mmclassification/issues/661 * fix lint Co-authored-by: Zhicheng Chen <chen1319276472@foxmail.com>pull/685/head
parent
32d606e1a1
commit
d73eb01cba
|
@ -193,7 +193,7 @@ def parse_args():
|
|||
add_time_parser(subparsers)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.window_size != '':
|
||||
if hasattr(args, 'window_size') and args.window_size != '':
|
||||
assert re.match(r'\d+\*\d+', args.window_size), \
|
||||
"'window-size' must be in format 'W*H'."
|
||||
return args
|
||||
|
|
Loading…
Reference in New Issue