← all repositories

Bjarten/early-stopping-pytorch

A Python library providing an EarlyStopping class to monitor validation loss and halt PyTorch model training before overfitting occurs.

1.3k stars Jupyter Notebook ML Frameworks
early-stopping-pytorch
Velocity · 7d
+0.5
★ / day
Trend
steady
star history

The repository provides a reusable EarlyStopping class for PyTorch that tracks validation loss during training. When the loss fails to improve for a specified number of epochs (patience), training stops automatically. The class also saves model checkpoints each time validation loss decreases, enabling recovery of the best-performing model state. An MNIST example notebook demonstrates practical usage.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.