Fix untrained warning when training from yaml (#18168)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
4cef9d047e
commit
8535d36885
1 changed files with 1 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ class BaseValidator:
|
||||||
self.args.plots &= trainer.stopper.possible_stop or (trainer.epoch == trainer.epochs - 1)
|
self.args.plots &= trainer.stopper.possible_stop or (trainer.epoch == trainer.epochs - 1)
|
||||||
model.eval()
|
model.eval()
|
||||||
else:
|
else:
|
||||||
if str(self.args.model).endswith(".yaml"):
|
if str(self.args.model).endswith(".yaml") and model is None:
|
||||||
LOGGER.warning("WARNING ⚠️ validating an untrained model YAML will result in 0 mAP.")
|
LOGGER.warning("WARNING ⚠️ validating an untrained model YAML will result in 0 mAP.")
|
||||||
callbacks.add_integration_callbacks(self)
|
callbacks.add_integration_callbacks(self)
|
||||||
model = AutoBackend(
|
model = AutoBackend(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue