Early Stopping Min Epochs
🚀 Feature
The EarlyStopping callback should allow the user to specify a minimum number of epochs to run before early stopping is triggered
Motivation
In many modern training loops, the learning rate is varied in some kind of cycle. For example, in the Transformer paper, they warm up the learning rate by increasing it gradually until a certain number of training steps, then they cool it by decreasing it as 1/sqrt(steps).
In cases like these, the user may want to run a certain minimum number of epochs, for example to ensure that the learning rate has achieved a given value before stopping.
Pitch
An additional parameter, min_epochs should be added to EarlyStopping (default=0 for backwards compatibility). The stopping will then trigger if both patience epochs have passed since the last improvement and at least min_epochs epochs have passed in total.