Skip to content

Commit 117a4d1

Browse files
authoredJul 18, 2020
fix inference bug
1 parent 182dae0 commit 117a4d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎tools/test_recognizer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def main():
173173
if args.gpus == 1:
174174
model = build_recognizer(
175175
cfg.model, train_cfg=None, test_cfg=cfg.test_cfg)
176-
load_checkpoint(model, args.checkpoint, strict=True, map_location='cpu')
176+
load_checkpoint(model, args.checkpoint, strict=False, map_location='cpu')
177177
model = MMDataParallel(model, device_ids=[0])
178178

179179
data_loader = build_dataloader(
@@ -206,7 +206,7 @@ def main():
206206
shuffle=False)
207207
model = build_recognizer(
208208
cfg.model, train_cfg=None, test_cfg=cfg.test_cfg)
209-
load_checkpoint(model, args.checkpoint, strict=True, map_location='cpu')
209+
load_checkpoint(model, args.checkpoint, strict=False, map_location='cpu')
210210
model = MMDistributedDataParallel(model.cuda())
211211
outputs = multi_gpu_test(model, data_loader, args.tmpdir)
212212
else:

0 commit comments

Comments
 (0)
Please sign in to comment.