From 23d3ea61d9ac4c584be93e3ff7cd33080cfb56e2 Mon Sep 17 00:00:00 2001 From: Tao Luo Date: Fri, 25 Sep 2020 17:33:24 +0800 Subject: [PATCH] add ips for detection models (#1507) test=develop --- tools/train.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/train.py b/tools/train.py index dd2edbd43..b2632f493 100644 --- a/tools/train.py +++ b/tools/train.py @@ -255,8 +255,9 @@ def main(): train_stats.update(stats) logs = train_stats.log() if it % cfg.log_iter == 0 and (not FLAGS.dist or trainer_id == 0): - strs = 'iter: {}, lr: {:.6f}, {}, time: {:.3f}, eta: {}'.format( - it, np.mean(outs[-1]), logs, time_cost, eta) + ips = float(cfg['TrainReader']['batch_size']) / time_cost + strs = 'iter: {}, lr: {:.6f}, {}, batch_cost: {:.5f} s, eta: {}, ips: {:.5f} images/sec'.format( + it, np.mean(outs[-1]), logs, time_cost, eta, ips) logger.info(strs) # NOTE : profiler tools, used for benchmark -- GitLab