Fix validator model=None (#16699)

pull/16696/head^2
Glenn Jocher 2 months ago committed by GitHub
parent 4b95ae70a0
commit 2e084c0581
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/engine/validator.py

@ -119,7 +119,7 @@ class BaseValidator:
self.args.plots &= trainer.stopper.possible_stop or (trainer.epoch == trainer.epochs - 1)
model.eval()
else:
if Path(self.args.model).suffix == ".yaml":
if str(self.args.model).endswith(".yaml"):
LOGGER.warning("WARNING ⚠ validating an untrained model YAML will result in 0 mAP.")
callbacks.add_integration_callbacks(self)
model = AutoBackend(

Loading…
Cancel
Save