Giter Club home page Giter Club logo

ranger_optimizer_gluon's Introduction

Ranger - Custom Optimizer for MXnet

Unofficial implementation of 'Ranger - Synergistic combination of RAdam + LookAhead for the best of both' using mxnet gluon.

Original medium article: https://medium.com/@lessw/new-deep-learning-optimizer-ranger-synergistic-combination-of-radam-lookahead-for-the-best-of-2dc83f79a48d

Official implementation: https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer

How to use

Import 'ranger_optimizer' file

import ranger_optimizer

Create optimizer object

optimizer = ranger_optimizer.Ranger(learning_rate=0.001, wd=0)

Create trainer object

trainer = gluon.Trainer(net.collect_params(), optimizer)

Hyper Parameters

learning_rate : float, default 0.001
The initial learning rate. If None, the optimization will use the
learning rate from lr_scheduler. If not None, it will overwrite
the learning rate in lr_scheduler. If None and lr_scheduler
is also None, then it will be set to 0.001 by default.

wd : float, default 0
Weight decay value.

alpha : float, default 0.5
Scale the subtraction between 'fast learner' and 'slow learner'.

k : int, default 6
Update 'slow learner' after 6 updates.

beta1 : float, default 0.9
Exponential decay rate for the first moment estimates.

beta2 : float, default 0.999
Exponential decay rate for the second moment estimates.

epsilon : float, default 1e-8
Small value to avoid division by 0.

use_gc : bool, default True
Center the gradients by subtract mean

gc_conv_only : bool, default False
Whether to center only convolution layers or everything

ranger_optimizer_gluon's People

Contributors

eitan3 avatar

Stargazers

Jiachen Zhong avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.