瀏覽代碼

Update `on_train_end` callback (#7716)

modifyDataloader
Glenn Jocher GitHub 2 年之前
父節點
當前提交
aa7a0e91b1
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 1 行新增1 行删除
  1. +0
    -1
      train.py
  2. +1
    -0
      utils/loggers/__init__.py

+ 0
- 1
train.py 查看文件

@@ -466,7 +466,6 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio
callbacks.run('on_fit_epoch_end', list(mloss) + list(results) + lr, epoch, best_fitness, fi)

callbacks.run('on_train_end', last, best, plots, epoch, results)
LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}")

torch.cuda.empty_cache()
return results

+ 1
- 0
utils/loggers/__init__.py 查看文件

@@ -164,6 +164,7 @@ class Loggers():
plot_results(file=self.save_dir / 'results.csv') # save results.png
files = ['results.png', 'confusion_matrix.png', *(f'{x}_curve.png' for x in ('F1', 'PR', 'P', 'R'))]
files = [(self.save_dir / f) for f in files if (self.save_dir / f).exists()] # filter
self.logger.info(f"Results saved to {colorstr('bold', self.save_dir)}")

if self.tb:
for f in files:

Loading…
取消
儲存