Fix end2end attribute in init_criterion (#14267)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
ec1b861392
commit
c91ba7b5c1
1 changed files with 1 additions and 1 deletions
|
|
@ -379,7 +379,7 @@ class DetectionModel(BaseModel):
|
||||||
|
|
||||||
def init_criterion(self):
|
def init_criterion(self):
|
||||||
"""Initialize the loss criterion for the DetectionModel."""
|
"""Initialize the loss criterion for the DetectionModel."""
|
||||||
return E2EDetectLoss(self) if self.end2end else v8DetectionLoss(self)
|
return E2EDetectLoss(self) if getattr(self, "end2end", False) else v8DetectionLoss(self)
|
||||||
|
|
||||||
|
|
||||||
class OBBModel(DetectionModel):
|
class OBBModel(DetectionModel):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue