Unverified Commit f482dd78 authored by Yezhen Cong's avatar Yezhen Cong Committed by GitHub
Browse files

[Refactor] Customize runner type (#437)

parent e37f5d5e
...@@ -108,7 +108,7 @@ optimizer = dict(type='AdamW', lr=lr, weight_decay=0) ...@@ -108,7 +108,7 @@ optimizer = dict(type='AdamW', lr=lr, weight_decay=0)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2)) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
lr_config = dict(policy='step', warmup=None, step=[80, 120]) lr_config = dict(policy='step', warmup=None, step=[80, 120])
# runtime settings # runtime settings
total_epochs = 150 runner = dict(max_epochs=150)
# yapf:disable # yapf:disable
log_config = dict( log_config = dict(
......
...@@ -84,4 +84,4 @@ optimizer = dict(type='AdamW', lr=lr, weight_decay=0) ...@@ -84,4 +84,4 @@ optimizer = dict(type='AdamW', lr=lr, weight_decay=0)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2)) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
lr_config = dict(policy='step', warmup=None, step=[80, 120]) lr_config = dict(policy='step', warmup=None, step=[80, 120])
# runtime settings # runtime settings
total_epochs = 150 runner = dict(max_epochs=150)
...@@ -21,4 +21,4 @@ momentum_config = dict( ...@@ -21,4 +21,4 @@ momentum_config = dict(
) )
# runtime settings # runtime settings
total_epochs = 20 runner = dict(type='EpochBasedRunner', max_epochs=20)
...@@ -25,7 +25,7 @@ momentum_config = dict( ...@@ -25,7 +25,7 @@ momentum_config = dict(
cyclic_times=1, cyclic_times=1,
step_ratio_up=0.4, step_ratio_up=0.4,
) )
# Although the total_epochs is 40, this schedule is usually used we # Although the max_epochs is 40, this schedule is usually used we
# RepeatDataset with repeat ratio N, thus the actual total epoch # RepeatDataset with repeat ratio N, thus the actual max epoch
# number could be Nx40 # number could be Nx40
total_epochs = 40 runner = dict(type='EpochBasedRunner', max_epochs=40)
...@@ -8,4 +8,4 @@ lr_config = dict( ...@@ -8,4 +8,4 @@ lr_config = dict(
warmup_iters=500, warmup_iters=500,
warmup_ratio=0.001, warmup_ratio=0.001,
step=[8, 11]) step=[8, 11])
total_epochs = 12 runner = dict(type='EpochBasedRunner', max_epochs=12)
...@@ -11,4 +11,4 @@ lr_config = dict( ...@@ -11,4 +11,4 @@ lr_config = dict(
step=[20, 23]) step=[20, 23])
momentum_config = None momentum_config = None
# runtime settings # runtime settings
total_epochs = 24 runner = dict(type='EpochBasedRunner', max_epochs=24)
...@@ -6,4 +6,4 @@ optimizer = dict(type='AdamW', lr=lr, weight_decay=0.01) ...@@ -6,4 +6,4 @@ optimizer = dict(type='AdamW', lr=lr, weight_decay=0.01)
optimizer_config = dict(grad_clip=dict(max_norm=10, norm_type=2)) optimizer_config = dict(grad_clip=dict(max_norm=10, norm_type=2))
lr_config = dict(policy='step', warmup=None, step=[24, 32]) lr_config = dict(policy='step', warmup=None, step=[24, 32])
# runtime settings # runtime settings
total_epochs = 36 runner = dict(type='EpochBasedRunner', max_epochs=36)
...@@ -312,7 +312,7 @@ log_config = dict( ...@@ -312,7 +312,7 @@ log_config = dict(
]) ])
# yapf:enable # yapf:enable
# runtime settings # runtime settings
total_epochs = 80 runner = dict(max_epochs=80)
dist_params = dict(backend='nccl', port=29506) dist_params = dict(backend='nccl', port=29506)
log_level = 'INFO' log_level = 'INFO'
find_unused_parameters = True find_unused_parameters = True
......
...@@ -182,7 +182,7 @@ log_config = dict( ...@@ -182,7 +182,7 @@ log_config = dict(
]) ])
# yapf:enable # yapf:enable
# runtime settings # runtime settings
total_epochs = 50 runner = dict(max_epochs=50)
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/pp_secfpn_100e' work_dir = './work_dirs/pp_secfpn_100e'
......
...@@ -225,7 +225,7 @@ log_config = dict( ...@@ -225,7 +225,7 @@ log_config = dict(
]) ])
# yapf:enable # yapf:enable
# runtime settings # runtime settings
total_epochs = 80 runner = dict(max_epochs=80)
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/pp_secfpn_80e' work_dir = './work_dirs/pp_secfpn_80e'
......
...@@ -227,7 +227,7 @@ log_config = dict( ...@@ -227,7 +227,7 @@ log_config = dict(
]) ])
# yapf:enable # yapf:enable
# runtime settings # runtime settings
total_epochs = 80 runner = dict(max_epochs=80)
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/sec_secfpn_80e' work_dir = './work_dirs/sec_secfpn_80e'
......
...@@ -66,4 +66,4 @@ data = dict(train=dict(pipeline=train_pipeline)) ...@@ -66,4 +66,4 @@ data = dict(train=dict(pipeline=train_pipeline))
lr_config = dict(step=[28, 34]) lr_config = dict(step=[28, 34])
evaluation = dict(interval=36) evaluation = dict(interval=36)
total_epochs = 36 runner = dict(max_epochs=36)
...@@ -66,4 +66,4 @@ train_pipeline = [ ...@@ -66,4 +66,4 @@ train_pipeline = [
data = dict(train=dict(pipeline=train_pipeline)) data = dict(train=dict(pipeline=train_pipeline))
lr_config = dict(step=[28, 34]) lr_config = dict(step=[28, 34])
evaluation = dict(interval=36) evaluation = dict(interval=36)
total_epochs = 36 runner = dict(max_epochs=36)
...@@ -53,6 +53,6 @@ lr_config = dict( ...@@ -53,6 +53,6 @@ lr_config = dict(
warmup_iters=500, warmup_iters=500,
warmup_ratio=0.001, warmup_ratio=0.001,
step=[6]) step=[6])
total_epochs = 8 runner = dict(max_epochs=8)
load_from = 'http://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco_bbox_mAP-0.408__segm_mAP-0.37_20200504_163245-42aa3d00.pth' # noqa load_from = 'http://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco_bbox_mAP-0.408__segm_mAP-0.37_20200504_163245-42aa3d00.pth' # noqa
...@@ -248,7 +248,7 @@ log_config = dict( ...@@ -248,7 +248,7 @@ log_config = dict(
# yapf:enable # yapf:enable
evaluation = dict(interval=1) evaluation = dict(interval=1)
# runtime settings # runtime settings
total_epochs = 40 runner = dict(max_epochs=40)
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = None work_dir = None
......
...@@ -2,6 +2,6 @@ _base_ = './cascade_mask_rcnn_r50_fpn_1x_nuim.py' ...@@ -2,6 +2,6 @@ _base_ = './cascade_mask_rcnn_r50_fpn_1x_nuim.py'
# learning policy # learning policy
lr_config = dict(step=[16, 19]) lr_config = dict(step=[16, 19])
total_epochs = 20 runner = dict(max_epochs=20)
load_from = 'http://download.openmmlab.com/mmdetection/v2.0/cascade_rcnn/cascade_mask_rcnn_r50_fpn_20e_coco/cascade_mask_rcnn_r50_fpn_20e_coco_bbox_mAP-0.419__segm_mAP-0.365_20200504_174711-4af8e66e.pth' # noqa load_from = 'http://download.openmmlab.com/mmdetection/v2.0/cascade_rcnn/cascade_mask_rcnn_r50_fpn_20e_coco/cascade_mask_rcnn_r50_fpn_20e_coco_bbox_mAP-0.419__segm_mAP-0.365_20200504_174711-4af8e66e.pth' # noqa
_base_ = './htc_r50_fpn_coco-20e_1x_nuim.py' _base_ = './htc_r50_fpn_coco-20e_1x_nuim.py'
# learning policy # learning policy
lr_config = dict(step=[16, 19]) lr_config = dict(step=[16, 19])
total_epochs = 20 runner = dict(max_epochs=20)
...@@ -18,6 +18,6 @@ model = dict( ...@@ -18,6 +18,6 @@ model = dict(
data = dict(samples_per_gpu=1, workers_per_gpu=1) data = dict(samples_per_gpu=1, workers_per_gpu=1)
# learning policy # learning policy
lr_config = dict(step=[16, 19]) lr_config = dict(step=[16, 19])
total_epochs = 20 runner = dict(max_epochs=20)
load_from = 'http://download.openmmlab.com/mmdetection/v2.0/htc/htc_x101_64x4d_fpn_dconv_c3-c5_mstrain_400_1400_16x1_20e_coco/htc_x101_64x4d_fpn_dconv_c3-c5_mstrain_400_1400_16x1_20e_coco_20200312-946fd751.pth' # noqa load_from = 'http://download.openmmlab.com/mmdetection/v2.0/htc/htc_x101_64x4d_fpn_dconv_c3-c5_mstrain_400_1400_16x1_20e_coco/htc_x101_64x4d_fpn_dconv_c3-c5_mstrain_400_1400_16x1_20e_coco_20200312-946fd751.pth' # noqa
...@@ -47,6 +47,6 @@ data = dict( ...@@ -47,6 +47,6 @@ data = dict(
# learning policy # learning policy
lr_config = dict(step=[16, 19]) lr_config = dict(step=[16, 19])
total_epochs = 20 runner = dict(max_epochs=20)
load_from = 'http://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco_bbox_mAP-0.408__segm_mAP-0.37_20200504_163245-42aa3d00.pth' # noqa load_from = 'http://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco/mask_rcnn_r50_caffe_fpn_mstrain-poly_3x_coco_bbox_mAP-0.408__segm_mAP-0.37_20200504_163245-42aa3d00.pth' # noqa
...@@ -83,4 +83,4 @@ evaluation = dict(interval=2) ...@@ -83,4 +83,4 @@ evaluation = dict(interval=2)
# PointPillars usually need longer schedule than second, we simply double # PointPillars usually need longer schedule than second, we simply double
# the training schedule. Do remind that since we use RepeatDataset and # the training schedule. Do remind that since we use RepeatDataset and
# repeat factor is 2, so we actually train 160 epochs. # repeat factor is 2, so we actually train 160 epochs.
total_epochs = 80 runner = dict(max_epochs=80)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment