Skip to content

Commit 0ad20f1

Browse files
lyttonhaofacebook-github-bot
authored andcommitted
set matching_heuristics as True by default
Summary: Set matching_heuristics as True by default as detection methods usually add some prefix (e.g. "backbone.") for pre-trained weights Reviewed By: wat3rBro Differential Revision: D35519683 fbshipit-source-id: 77d3d53d556757c8f45b5ea3c2edec239e70a7a0
1 parent dc1b7d1 commit 0ad20f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

detectron2/checkpoint/detection_checkpoint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def _load_file(self, filename):
8888
loaded = super()._load_file(filename) # load native pth checkpoint
8989
if "model" not in loaded:
9090
loaded = {"model": loaded}
91+
loaded["matching_heuristics"] = True
9192
return loaded
9293

9394
def _load_model(self, checkpoint):

0 commit comments

Comments
 (0)