From aa834b2e798ddce5594a34e85d53f150e914c60c Mon Sep 17 00:00:00 2001 From: wanghuancoder Date: Tue, 13 Oct 2020 11:16:27 +0800 Subject: [PATCH] refine PaddleDetection benchmard print (#1556) * refine PaddleDetection benchmard print, test=develop * refine PaddleDetection benchmard print, test=develop * refine PaddleDetection benchmard print, test=develop * refine PaddleDetection benchmard print, test=develop --- configs/cascade_rcnn_r50_1x.yml | 2 +- configs/faster_rcnn_r50_1x.yml | 2 +- configs/mask_rcnn_r50_1x.yml | 2 +- configs/mask_rcnn_r50_fpn_1x.yml | 2 +- configs/yolov3_darknet.yml | 2 +- tools/train.py | 10 +++++----- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/configs/cascade_rcnn_r50_1x.yml b/configs/cascade_rcnn_r50_1x.yml index e6e1f7d6b..fd7219a53 100644 --- a/configs/cascade_rcnn_r50_1x.yml +++ b/configs/cascade_rcnn_r50_1x.yml @@ -1,7 +1,7 @@ architecture: CascadeRCNN use_gpu: true max_iters: 180000 -log_smooth_window: 50 +log_iter: 50 save_dir: output snapshot_iter: 10000 pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/dygraph/resnet50.pdparams diff --git a/configs/faster_rcnn_r50_1x.yml b/configs/faster_rcnn_r50_1x.yml index d36b45abd..307a6999e 100644 --- a/configs/faster_rcnn_r50_1x.yml +++ b/configs/faster_rcnn_r50_1x.yml @@ -1,7 +1,7 @@ architecture: FasterRCNN use_gpu: true max_iters: 180000 -log_smooth_window: 50 +log_iter: 50 save_dir: output snapshot_iter: 10000 pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/dygraph/resnet50.pdparams diff --git a/configs/mask_rcnn_r50_1x.yml b/configs/mask_rcnn_r50_1x.yml index 7f089140a..467cf73b9 100644 --- a/configs/mask_rcnn_r50_1x.yml +++ b/configs/mask_rcnn_r50_1x.yml @@ -1,7 +1,7 @@ architecture: MaskRCNN use_gpu: true max_iters: 180000 -log_smooth_window: 50 +log_iter: 50 save_dir: output snapshot_iter: 10000 pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/dygraph/resnet50.pdparams diff --git a/configs/mask_rcnn_r50_fpn_1x.yml b/configs/mask_rcnn_r50_fpn_1x.yml index 30b97fde0..c68d726cc 100644 --- a/configs/mask_rcnn_r50_fpn_1x.yml +++ b/configs/mask_rcnn_r50_fpn_1x.yml @@ -1,7 +1,7 @@ architecture: MaskRCNN use_gpu: true max_iters: 180000 -log_smooth_window: 20 +log_iter: 20 save_dir: output snapshot_iter: 10000 pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_cos_pretrained.tar diff --git a/configs/yolov3_darknet.yml b/configs/yolov3_darknet.yml index 15e899a92..ff0b88fa6 100644 --- a/configs/yolov3_darknet.yml +++ b/configs/yolov3_darknet.yml @@ -1,7 +1,7 @@ architecture: YOLOv3 use_gpu: true max_iters: 500000 -log_smooth_window: 20 +log_iter: 20 save_dir: output snapshot_iter: 50000 metric: COCO diff --git a/tools/train.py b/tools/train.py index 13fa7290d..178df7958 100755 --- a/tools/train.py +++ b/tools/train.py @@ -132,7 +132,7 @@ def run(FLAGS, cfg): train_reader = create_reader( cfg.TrainReader, (cfg.max_iters - start_iter), cfg, devices_num=1) - time_stat = deque(maxlen=cfg.log_smooth_window) + time_stat = deque(maxlen=cfg.log_iter) start_time = time.time() end_time = time.time() # Run Train @@ -167,13 +167,13 @@ def run(FLAGS, cfg): if ParallelEnv().nranks < 2 or ParallelEnv().local_rank == 0: # Log state if iter_id == 0: - train_stats = TrainingStats(cfg.log_smooth_window, - outputs.keys()) + train_stats = TrainingStats(cfg.log_iter, outputs.keys()) train_stats.update(outputs) logs = train_stats.log() if iter_id % cfg.log_iter == 0: - strs = 'iter: {}, lr: {:.6f}, {}, time: {:.3f}, eta: {}'.format( - iter_id, curr_lr, logs, time_cost, eta) + ips = float(cfg['TrainReader']['batch_size']) / time_cost + strs = 'iter: {}, lr: {:.6f}, {}, eta: {}, batch_cost: {:.5f} sec, ips: {:.5f} images/sec'.format( + iter_id, curr_lr, logs, eta, time_cost, ips) logger.info(strs) # Save Stage if iter_id > 0 and iter_id % int( -- GitLab