Skip to main content

Lookahead mechanism for optimizers 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

External Links

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.

Files for keras-lookahead, version 0.9.0
Filename, size File type Python version Upload date Hashes
Filename, size keras-lookahead-0.9.0.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page