CyberZHG Keras Lookahead Save Abandoned

Lookahead mechanism for optimizers in Keras.

Project README

Keras Lookahead

Travis Coverage

This repo is outdated and will no longer be maintained.

Unofficial implementation of the lookahead mechanism for optimizers.

Install

pip install git+https://github.com/cyberzhg/keras-lookahead.git

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())
Open Source Agenda is not affiliated with "CyberZHG Keras Lookahead" Project. README Source: CyberZHG/keras-lookahead
Stars
49
Open Issues
0
Last Commit
2 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating