Skip to content

Commit

Permalink
fix yolo classify model loading error (ultralytics#9196)
Browse files Browse the repository at this point in the history
  • Loading branch information
DseidLi authored and hmurari committed Apr 17, 2024
1 parent 1da7da9 commit 4fb5e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ultralytics/models/yolo/classify/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def setup_model(self):
elif model in torchvision.models.__dict__:
self.model = torchvision.models.__dict__[model](weights="IMAGENET1K_V1" if self.args.pretrained else None)
else:
FileNotFoundError(f"ERROR: model={model} not found locally or online. Please check model name.")
raise FileNotFoundError(f"ERROR: model={model} not found locally or online. Please check model name.")
ClassificationModel.reshape_outputs(self.model, self.data["nc"])

return ckpt
Expand Down

0 comments on commit 4fb5e94

Please sign in to comment.