Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wkcn/LookaheadOptimizer-mx

Lookahead Optimizer: k steps forward, 1step back for MXNet
https://github.com/wkcn/LookaheadOptimizer-mx

lookahead mxnet optimizer

Last synced: about 2 months ago
JSON representation

Lookahead Optimizer: k steps forward, 1step back for MXNet

Awesome Lists containing this project

README

        

# Lookahead Optimizer: k steps forward, 1step back
It is a MXNet implementation of Lookahead Optimizer.

The link of the paper: https://arxiv.org/abs/1907.08610

## Usage
Import `optimizer.py`, then add the prefix `Lookahead` before the name of [arbitrary optimizer](http://mxnet.incubator.apache.org/api/python/optimization/optimization.html?highlight=opt#module-mxnet.optimizer).

```python
import optimizer
optimizer.LookaheadSGD(k=5, alpha=0.5, learning_rate=1e-3)
```

## Example
```bash
python mnist.py --optimizer sgd --seed 42
python mnist.py --optimizer lookaheadsgd --seed 42
```