Add on_fit_epoch_end callback (#5232)

* Add `on_fit_epoch_end` callback

* Add results to train

* Update __init__.py
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-10-18 14:28:22 +02:00
1 parent 13f7275555
commit 752d97df2c
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -423,8 +423,10 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
plots=True,
callbacks=callbacks,
compute_loss=compute_loss) # val best model with plots
if is_coco:
callbacks.run('on_fit_epoch_end', list(mloss) + list(results) + lr, epoch, best_fitness, fi)
callbacks.run('on_train_end', last, best, plots, epoch)
callbacks.run('on_train_end', last, best, plots, epoch, results)
LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}")
torch.cuda.empty_cache()