Skip to main content

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.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

early_stopping-0.1.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file early-stopping-0.1.3.tar.gz.

File metadata

  • Download URL: early-stopping-0.1.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.4.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.8

File hashes

Hashes for early-stopping-0.1.3.tar.gz
Algorithm Hash digest
SHA256 745bee74fbd7a8a03da994290f806f6857e6e9768f8ab0ff686d11a4f0c73a9a
MD5 471dd967a8832656256b8666f8c116b9
BLAKE2b-256 1c05780882b8f4b582e09562f69dcc3ed11035b5c4fdf9c1e983456acf50d8f0

See more details on using hashes here.

File details

Details for the file early_stopping-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: early_stopping-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.4.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.8

File hashes

Hashes for early_stopping-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d97df79e5cab5d028c665f9f7b2abad2af069159110025032a05f1367486cf5e
MD5 71dd48482ac861828a2fb82eb3ff954b
BLAKE2b-256 f7bd9d710c860595615c98f936e8cd224481ef720a199b1adcbe4fb5e5b09e39

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page