Skip to content

Commit

Permalink
documentation changes. added full reference (apache#12153)
Browse files Browse the repository at this point in the history
* documentation changes. added full reference

* fixing lint

* fixing more lint

* jenkins

* adding the coding line utf-8
  • Loading branch information
yuxiangw authored and sandeep-krishnamurthy committed Aug 15, 2018
1 parent 9b31072 commit b5d474d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions python/mxnet/optimizer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding: utf-8
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand All @@ -15,7 +16,6 @@
# specific language governing permissions and limitations
# under the License.

# coding: utf-8
# pylint: disable=too-many-lines
"""Weight updating functions."""
import logging
Expand Down Expand Up @@ -548,15 +548,19 @@ def update_multi_precision(self, index, weight, grad, state):

@register
class Signum(Optimizer):
"""The Signum optimizer that takes the sign of gradient or momentum.
r"""The Signum optimizer that takes the sign of gradient or momentum.
The optimizer updates the weight by::
rescaled_grad = rescale_grad * clip(grad, clip_gradient) + wd * weight
state = momentum * state + (1-momentum)*rescaled_grad
weight = (1 - lr * wd_lh) * weight - lr * sign(state)
See the original paper at: https://jeremybernste.in/projects/amazon/signum.pdf
Reference:
Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli & Anima Anandkumar. (2018).
signSGD: Compressed Optimisation for Non-Convex Problems. In ICML'18.
See: https://arxiv.org/abs/1802.04434
For details of the update algorithm see
:class:`~mxnet.ndarray.signsgd_update` and :class:`~mxnet.ndarray.signum_update`.
Expand Down

0 comments on commit b5d474d

Please sign in to comment.