Bjarten/early-stopping-pytorch
A Python library providing an EarlyStopping class to monitor validation loss and halt PyTorch model training before overfitting occurs.

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.