Revert loss head PR (#2873)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Ayush Chaurasia 2023-05-28 19:45:41 +05:30 committed by GitHub
parent 6391c60089
commit 527a97759b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 335 additions and 327 deletions

View file

@ -162,8 +162,7 @@ class BaseValidator:
# Loss
with dt[2]:
if self.training:
loss_items = model.loss(batch, preds)
self.loss += loss_items[1]
self.loss += trainer.criterion(preds, batch)[1]
# Postprocess
with dt[3]: