Keras EarlyStopping patience parameter

Viewed 9567

I'm trying to do some binary classification and I use Keras's EarlyStopping callback. However, I have a question regarding patience parameter.

In the documentation it is stated

patience: number of epochs with no improvement after which training will be stopped.

but I find that it behaves in a different way. For example, I have set

EarlyStopping(monitor='val_loss', min_delta=0.0001, patience=2, verbose=0, mode='auto')

and here are the results:

val_loss: 0.6811
val_loss: 0.6941 
val_loss: 0.6532
val_loss: 0.6546
val_loss: 0.6534
val_loss: 0.6489
val_loss: 0.6240
val_loss: 0.6285
val_loss: 0.6144
val_loss: 0.5921
val_loss: 0.5731
val_loss: 0.5956
val_loss: 0.5753
val_loss: 0.5977

enter image description here

After this training has stopped. As far as I see there are no 2 consecutively increasing loss values at the end. Could someone give an explanation to this parameter-phenomena?

2 Answers
Related