Pytorch Scheduler: how to get decreasing LR epochs
I'm training a network in pytorch and using ReduceLROnPlateau as scheduler.
I set verbose=True in the parameteres and my scheduler prints something like:

Epoch   159: reducing learning rate to 6.0000e-04.
Epoch   169: reducing learning rate to 3.0000e-04.
Epoch   178: reducing learning rate to 1.5000e-04.
Epoch   187: reducing learning rate to 7.5000e-05.

I would like to get the epochs in some way, in order to obtain a list with all the epochs in which the scheduler reduced the learning rate.
Something like: lr_decrease_epochs = ['159', '169', '178', '187']
Which is the simplest way to do that ?

I think the scheduler doesn't take track of this (at least I didn't see anything like this in the source code), but you can just keep track of this in your training loop.
Whenever the learning rate changes (scheduler.get_lr()) you simply record the current epoch.
