[fix] replace ema_model with model in demo/test_ap_on_coco (#242)

pull/254/head
Shiyu 2023-11-13 13:52:37 +08:00 committed by GitHub
parent 60d796825e
commit eeba084341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ def load_model(model_config_path: str, model_checkpoint_path: str, device: str =
args.device = device
model = build_model(args)
checkpoint = torch.load(model_checkpoint_path, map_location="cpu")
model.load_state_dict(clean_state_dict(checkpoint["ema_model"]), strict=False)
model.load_state_dict(clean_state_dict(checkpoint["model"]), strict=False)
model.eval()
return model