Skip to content

Commit

Permalink
Fix open-mmlab#416: Fix undesired assignment to "pretrained" in test.…
Browse files Browse the repository at this point in the history
…py (open-mmlab#418)

* fix ocr linting

* fix undesired assignment to pretrained key
  • Loading branch information
gaotongxiao authored Aug 10, 2021
1 parent c068ccb commit b373201
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions mmocr/utils/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ def __init__(self,
},
'RobustScanner': {
'config': 'robust_scanner/robustscanner_r31_academic.py',
'ckpt':
'robustscanner/robustscanner_r31_academic-5f05874f.pth'
'ckpt': 'robustscanner/robustscanner_r31_academic-5f05874f.pth'
},
'SEG': {
'config': 'seg/seg_r31_1by16_fpnocr_academic.py',
Expand Down
3 changes: 2 additions & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def main():
# set cudnn_benchmark
if cfg.get('cudnn_benchmark', False):
torch.backends.cudnn.benchmark = True
cfg.model.pretrained = None
if cfg.model.get('pretrained'):
cfg.model.pretrained = None
if cfg.model.get('neck'):
if isinstance(cfg.model.neck, list):
for neck_cfg in cfg.model.neck:
Expand Down

0 comments on commit b373201

Please sign in to comment.