ultralytics 8.1.36 improve train stop robustness epoch + 1 >= self.epochs (#9384)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
3aeb058e82
commit
ed2250cf1c
3 changed files with 4 additions and 3 deletions
|
|
@ -421,7 +421,7 @@ class BaseTrainer:
|
|||
self.lr = {f"lr/pg{ir}": x["lr"] for ir, x in enumerate(self.optimizer.param_groups)} # for loggers
|
||||
self.run_callbacks("on_train_epoch_end")
|
||||
if RANK in (-1, 0):
|
||||
final_epoch = epoch + 1 == self.epochs
|
||||
final_epoch = epoch + 1 >= self.epochs
|
||||
self.ema.update_attr(self.model, include=["yaml", "nc", "args", "names", "stride", "class_weights"])
|
||||
|
||||
# Validation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue