faster-rcnn_r50_fpn_1x_voc0712.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. _base_ = [
  2. '../_base_/models/faster-rcnn_r50_fpn.py', '../_base_/datasets/voc0712.py',
  3. '../_base_/default_runtime.py'
  4. ]
  5. model = dict(roi_head=dict(bbox_head=dict(num_classes=20)))
  6. # training schedule, voc dataset is repeated 3 times, in
  7. # `_base_/datasets/voc0712.py`, so the actual epoch = 4 * 3 = 12
  8. max_epochs = 4
  9. train_cfg = dict(
  10. type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=1)
  11. val_cfg = dict(type='ValLoop')
  12. test_cfg = dict(type='TestLoop')
  13. # learning rate
  14. param_scheduler = [
  15. dict(
  16. type='MultiStepLR',
  17. begin=0,
  18. end=max_epochs,
  19. by_epoch=True,
  20. milestones=[3],
  21. gamma=0.1)
  22. ]
  23. # optimizer
  24. optim_wrapper = dict(
  25. type='OptimWrapper',
  26. optimizer=dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001))
  27. # Default setting for scaling LR automatically
  28. # - `enable` means enable scaling LR automatically
  29. # or not by default.
  30. # - `base_batch_size` = (8 GPUs) x (2 samples per GPU).
  31. auto_scale_lr = dict(enable=False, base_batch_size=16)