Early stopping for neural networks
Project description
Early Stopping
I'm too lazy to read the Tensorflow documentation, so I made this simple early stopper. After each training step, feed the object the testing loss result for that epoch and it will return a boolean that says whether or not to break the training loop.
Installation
Install through pip as shown:
pip install early-stopping
Example Usage
from early_stopping import EarlyStopping
early_stopper = EarlyStopping(
depth=5,
ignore=20,
method='consistency'
)
# Your training loop
for epoch in range(EPOCHS):
# Train step here
# Test step here
# Check if we should break the loop
if early_stopper.check(testing_loss):
print('BREAKING THE TRAINING LOOP')
break
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
early-stopping-0.1.2.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for early_stopping-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 891ca7ae6fba77ec0de730604fddf2b0e8728aeeef222e4b4899db1a6bc2ab76 |
|
MD5 | 8087c9d712f0ad51772e93fb224d7805 |
|
BLAKE2b-256 | 48050e52f36209e3504204975bf4ac607ed8da655703eba0ae2aa5e3a8808515 |