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.
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.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for early_stopping-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fa5d0141f0c7e2fa2ac757d60fea06f61f705589948df6a42a0ef5a89558266 |
|
MD5 | 3593ead21499e8ddb33bd1809c411f81 |
|
BLAKE2b-256 | 9138c503f050154ac234f0589478d33df27beb6a4a5c08cabf832a4cef82739c |