diff --git a/configs/cascade_rcnn_r50_1x.yml b/configs/cascade_rcnn_r50_1x.yml index e6e1f7d6b6a8eab3d98020390e368505164c3a52..fd7219a5350eb8cdc420318822e1fe6f72f29a77 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 d36b45abd24481990c61951028a85a3f232df628..307a6999e4ab743b6006262dc35f02e19e6984a1 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 7f089140aeda88218669ab10f3b5dddc67be24d1..467cf73b99a971dba2d3c535ebf5062d5a2adbc0 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 30b97fde037af92409d283a3b80ce35afa806a79..c68d726cc71482012580577bcf3d79dda621f5b3 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 15e899a9285f048bc32835952d0c604fb8699790..ff0b88fa67167b74b1bd44c47b839e45f912c6de 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 13fa7290d742a540820f03cc8837a2852adbfbcf..178df7958d915f4fd5ca2bfada57f7b4eed79305 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(