Initialize model_name attribute (#19224)

This commit is contained in:
Love and hope 2025-02-13 20:57:36 +08:00 committed by GitHub
parent 316f6574ca
commit f4114b0319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,6 +122,7 @@ class Model(torch.nn.Module):
self.metrics = None # validation/training metrics
self.session = None # HUB session
self.task = task # task type
self.model_name = None # model name
model = str(model).strip()
# Check if Ultralytics HUB model from https://hub.ultralytics.com