What is early stopping in Keras?

Updated May 16, 2026

Short answer

Early stopping halts training when validation performance stops improving.

Deep explanation

It prevents overfitting by monitoring validation loss or accuracy.

Real-world example

Used in production ML pipelines to save compute.

Common mistakes

  • Monitoring training loss instead of validation loss.

Follow-up questions

  • What is patience?
  • Can early stopping restore best weights?

More Keras interview questions

View all →