Summary: make `deploy` adaptation for other models except repvgg
pull/443/head
liaoxingyu 2021-03-26 10:10:45 +08:00
parent 15c556c43a
commit 9d83550b67
1 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,8 @@ if __name__ == '__main__':
cfg.MODEL.HEADS.POOL_LAYER = 'avgpool'
model = build_model(cfg)
Checkpointer(model).load(cfg.MODEL.WEIGHTS)
model.backbone.deploy(True)
if hasattr(model.backbone, 'deploy'):
model.backbone.deploy(True)
model.eval()
logger.info(model)