Skip to main content

lookahead implemented in Keras

Project description

Keras Lookahead

Travis Coverage Version Downloads License

[中文|English]

Unofficial implementation of the lookahead mechanism for optimizers.

Install

pip install keras-lookahead

Usage

Arguments:

  • optimizer: Original optimizer.
  • sync_period: the k in the paper. The synchronization period.
  • slow_step: the α in the paper. The step size of slow weights.
from keras_lookahead import Lookahead

optimizer = Lookahead('adam', sync_period=5, slow_step=0.5)

Custom optimizers can also be used:

from keras_radam import RAdam
from keras_lookahead import Lookahead

optimizer = Lookahead(RAdam())

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

keras-lookahead-0.2.0.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file keras-lookahead-0.2.0.tar.gz.

File metadata

  • Download URL: keras-lookahead-0.2.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for keras-lookahead-0.2.0.tar.gz
Algorithm Hash digest
SHA256 39b2e51090ba681509ce9161507fc569dd34144704712cfbfc6d00ba20fc9aba
MD5 849dca02bc9dd0164b7e15919a8ddeb8
BLAKE2b-256 6e46d89bdb7201b1534ae54fb9582c06a0c04820b9ba4f93b7e68f29a37eac1f

See more details on using hashes here.

Provenance

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