What's the learning policy for YOLOX model?? #10027
Unanswered
leviathan-s
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I attached some part of my training log and config.
...I set learning rate 5.0e - 0.6 initially, and i found the learning rate decrease/increase slightly every epoch even though i set "learning step" as every 96 epoch.
What's the policy of this learning rate decay? and i want to apply this policy to other model also.
2023-03-20 14:15:05,208 - mmdet - INFO - Epoch [1][50/58] lr: 4.965e-06, eta: 0:41:05, time: 0.447, data_time: 0.240, memory: 1891, loss_cls: 0.7355, loss_bbox: 1.9380, loss_obj: 0.9336, loss: 3.6071
2023-03-20 14:15:31,791 - mmdet - INFO - Epoch [2][50/58] lr: 4.980e-06, eta: 0:39:07, time: 0.482, data_time: 0.249, memory: 1891, loss_cls: 0.6902, loss_bbox: 1.8569, loss_obj: 0.9272, loss: 3.4743
2023-03-20 14:15:56,064 - mmdet - INFO - Epoch [3][50/58] lr: 4.991e-06, eta: 0:36:55, time: 0.433, data_time: 0.236, memory: 1891, loss_cls: 0.7148, loss_bbox: 1.9442, loss_obj: 0.9632, loss: 3.6223
2023-03-20 14:16:29,870 - mmdet - INFO - Epoch [4][50/58] lr: 4.997e-06, eta: 0:36:01, time: 0.450, data_time: 0.234, memory: 1891, loss_cls: 0.7147, loss_bbox: 2.0103, loss_obj: 1.0067, loss: 3.7316
2023-03-20 14:16:55,575 - mmdet - INFO - Epoch [5][50/58] lr: 5.000e-06, eta: 0:35:03, time: 0.433, data_time: 0.233, memory: 1891, loss_cls: 0.7145, loss_bbox: 1.8874, loss_obj: 0.9604, loss: 3.5622
2023-03-20 14:17:22,138 - mmdet - INFO - Epoch [6][50/58] lr: 4.998e-06, eta: 0:34:54, time: 0.480, data_time: 0.258, memory: 1891, loss_cls: 0.7049, loss_bbox: 1.9546, loss_obj: 0.9405, loss: 3.6000
2023-03-20 14:17:54,196 - mmdet - INFO - Epoch [7][50/58] lr: 4.993e-06, eta: 0:34:41, time: 0.480, data_time: 0.256, memory: 1891, loss_cls: 0.7155, loss_bbox: 1.9247, loss_obj: 0.9675, loss: 3.6077
################################################## Config: optimizer = dict( type='SGD', lr=5e-06, momentum=0.9, weight_decay=0.0005, nesterov=True, paramwise_cfg=dict(norm_decay_mult=0.0, bias_decay_mult=0.0)) optimizer_config = dict(grad_clip=None) lr_config = dict( policy='YOLOX', warmup=None, by_epoch=False, warmup_by_epoch=True, warmup_ratio=1, warmup_iters=5, num_last_epochs=15, min_lr_ratio=0.05) runner = dict(type='EpochBasedRunner', max_epochs=96) checkpoint_config = dict(interval=48) log_config = dict( interval=50, hooks=[dict(type='TextLoggerHook'), dict(type='TensorboardLoggerHook')]) custom_hooks = [ dict(type='YOLOXModeSwitchHook', num_last_epochs=15, priority=48), dict(type='SyncNormHook', num_last_epochs=15, interval=10, priority=48), dict( type='ExpMomentumEMAHook', resume_from=None, momentum=0.0001, priority=49) ] dist_params = dict(backend='nccl') log_level = 'INFO' load_from = '/content/drive/MyDrive/Model_Weight(SMD)/YOLOx/best_bbox_mAP_epoch_96.pth' resume_from = None workflow = [('train', 1)] opencv_num_threads = 0 mp_start_method = 'fork' auto_scale_lr = dict(enable=False, base_batch_size=64) img_scale = (640, 640) model = dict( type='YOLOX', input_size=(640, 640), random_size_range=(15, 25), random_size_interval=10, backbone=dict(type='CSPDarknet', deepen_factor=0.33, widen_factor=0.5), neck=dict( type='YOLOXPAFPN', in_channels=[128, 256, 512], out_channels=128, num_csp_blocks=1), bbox_head=dict( type='YOLOXHead', num_classes=10, in_channels=128, feat_channels=128), train_cfg=dict(assigner=dict(type='SimOTAAssigner', center_radius=2.5)), test_cfg=dict(score_thr=0.01, nms=dict(type='nms', iou_threshold=0.65))) data_root = '/content/drive/MyDrive/SMDDataset/35_Frame' dataset_type = 'SMDDataset' train_pipeline = [ dict(type='Mosaic', img_scale=(640, 640), pad_val=114.0), dict( type='RandomAffine', scaling_ratio_range=(0.1, 2), border=(-320, -320)), dict( type='MixUp', img_scale=(640, 640), ratio_range=(0.8, 1.6), pad_val=114.0), dict(type='YOLOXHSVRandomAug'), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Resize', img_scale=(640, 640), keep_ratio=True), dict( type='Pad', pad_to_square=True, pad_val=dict(img=(114.0, 114.0, 114.0))), dict(type='FilterAnnotations', min_gt_bbox_wh=(1, 1), keep_empty=False), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) ] train_dataset = dict( type='MultiImageMixDataset', dataset=dict( type='SMDDataset', ann_file='/content/drive/MyDrive/SMDDataset/35_Frame/train.json', img_prefix='/content/drive/MyDrive/SMDDataset/35_Frame/train/', pipeline=[ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True) ], filter_empty_gt=False), pipeline=[ dict(type='Mosaic', img_scale=(640, 640), pad_val=114.0), dict( type='RandomAffine', scaling_ratio_range=(0.1, 2), border=(-320, -320)), dict( type='MixUp', img_scale=(640, 640), ratio_range=(0.8, 1.6), pad_val=114.0), dict(type='YOLOXHSVRandomAug'), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Resize', img_scale=(640, 640), keep_ratio=True), dict( type='Pad', pad_to_square=True, pad_val=dict(img=(114.0, 114.0, 114.0))), dict( type='FilterAnnotations', min_gt_bbox_wh=(1, 1), keep_empty=False), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) ]) test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(640, 640), flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict( type='Pad', pad_to_square=True, pad_val=dict(img=(114.0, 114.0, 114.0))), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ] data = dict( samples_per_gpu=2, workers_per_gpu=2, persistent_workers=True, train=dict( type='MultiImageMixDataset', dataset=dict( type='SMDDataset', ann_file='/content/drive/MyDrive/SMDDataset/35_Frame/val.json', img_prefix='/content/drive/MyDrive/SMDDataset/35_Frame/val/', pipeline=[ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True) ], filter_empty_gt=False), pipeline=[ dict(type='Mosaic', img_scale=(640, 640), pad_val=114.0), dict( type='RandomAffine', scaling_ratio_range=(0.1, 2), border=(-320, -320)), dict( type='MixUp', img_scale=(640, 640), ratio_range=(0.8, 1.6), pad_val=114.0), dict(type='YOLOXHSVRandomAug'), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Resize', img_scale=(640, 640), keep_ratio=True), dict( type='Pad', pad_to_square=True, pad_val=dict(img=(114.0, 114.0, 114.0))), dict( type='FilterAnnotations', min_gt_bbox_wh=(1, 1), keep_empty=False), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) ]), val=dict( type='SMDDataset', ann_file='/content/drive/MyDrive/SMDDataset/35_Frame/val.json', img_prefix='/content/drive/MyDrive/SMDDataset/35_Frame/val/', pipeline=[ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(640, 640), flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict( type='Pad', pad_to_square=True, pad_val=dict(img=(114.0, 114.0, 114.0))), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ]), test=dict( type='SMDDataset', ann_file='/content/drive/MyDrive/SMDDataset/35_Frame/val.json', img_prefix='/content/drive/MyDrive/SMDDataset/35_Frame/val/', pipeline=[ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(640, 640), flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict( type='Pad', pad_to_square=True, pad_val=dict(img=(114.0, 114.0, 114.0))), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img']) ]) ])) max_epochs = 300 num_last_epochs = 15 interval = 10 evaluation = dict( save_best='auto', interval=3, dynamic_intervals=[(285, 1)], metric='bbox') work_dir = '/content/drive/MyDrive/Model_Weight(SMD)/YOLOx' seed = 0 gpu_ids = range(0, 1) device = 'cuda'2023-03-20 14:18:18,117 - mmdet - INFO - Epoch [8][50/58] lr: 4.983e-06, eta: 0:33:59, time: 0.433, data_time: 0.225, memory: 1891, loss_cls: 0.7248, loss_bbox: 1.9330, loss_obj: 0.9756, loss: 3.6334
2023-03-20 14:18:42,633 - mmdet - INFO - Epoch [9][50/58] lr: 4.970e-06, eta: 0:33:23, time: 0.437, data_time: 0.227, memory: 1891, loss_cls: 0.6918, loss_bbox: 1.9476, loss_obj: 0.9024, loss: 3.5419
2023-03-20 14:19:13,479 - mmdet - INFO - Epoch [10][50/58] lr: 4.952e-06, eta: 0:32:51, time: 0.440, data_time: 0.235, memory: 1891, loss_cls: 0.6804, loss_bbox: 1.8836, loss_obj: 0.8347, loss: 3.3987
2023-03-20 14:19:39,076 - mmdet - INFO - Epoch [11][50/58] lr: 4.931e-06, eta: 0:32:30, time: 0.462, data_time: 0.254, memory: 1891, loss_cls: 0.6791, loss_bbox: 1.8831, loss_obj: 0.8885, loss: 3.4507
2023-03-20 14:20:04,453 - mmdet - INFO - Epoch [12][50/58] lr: 4.905e-06, eta: 0:31:59, time: 0.435, data_time: 0.223, memory: 1891, loss_cls: 0.6625, loss_bbox: 1.8673, loss_obj: 0.8118, loss: 3.3416
...
Beta Was this translation helpful? Give feedback.
All reactions