mmrotate icon indicating copy to clipboard operation
mmrotate copied to clipboard

Does it provide the LR scheduler 'ReduceOnPlateau'?

Open Jongmin1991 opened this issue 2 years ago • 2 comments

Model/Dataset/Scheduler description

If the loss does not decrease for a certain period in training stage, i want to adjust the learning rate automatically.

However, there does not seem to be a 'ReuceOnPlateau" in the lr_scheduler list provided by mmcv, mmdetection, mmrotate.

Maybe I couldn't find it ? If it is available, can you provide an example how it is used ?

Thanks in advance for your answer.

Open source status

  • [ ] The model implementation is available
  • [ ] The model weights are available.

Provide useful links for the implementation

No response

Jongmin1991 avatar Apr 12 '23 05:04 Jongmin1991

Hi @Jongmin1991, we have support ReduceOnPlateau in MMEngine, which you can directly use by

param_scheduler = [
    dict(
        type='ReduceOnPlateauLR',
        monitor='loss',
        rule='less',
        patience=50),
]

Please refer: https://github.com/open-mmlab/mmengine/blob/a7d4b7c7428061c8b85360a0e4e07d95eb1d5261/mmengine/optim/scheduler/param_scheduler.py#L1289

zytx121 avatar Apr 17 '23 15:04 zytx121

@Jongmin1991 by any chance did you manage to get ReduceOnPlateauLR to work on the 'loss'? I have the following error here https://github.com/open-mmlab/mmrotate/issues/1002 Many thanks!

tikitong avatar Mar 06 '24 03:03 tikitong