Browse Source

docs(mge/optimizer): refine the docstring of several apis

GitOrigin-RevId: a97fe5b68a
tags/v0.4.0
Megvii Engine Team Xinran Xu 5 years ago
parent
commit
ffe0409398
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      python_module/megengine/optimizer/adam.py
  2. +1
    -1
      python_module/megengine/optimizer/internal.py
  3. +1
    -1
      python_module/megengine/optimizer/lr_scheduler.py
  4. +1
    -1
      python_module/megengine/optimizer/sgd.py

+ 1
- 1
python_module/megengine/optimizer/adam.py View File

@@ -14,7 +14,7 @@ from .optimizer import Optimizer


class Adam(Optimizer):
r"""Implements Adam algorithm.
r"""Implements Adam algorithm proposed in `"Adam: A Method for Stochastic Optimization" <https://arxiv.org/abs/1412.6980>`_.

:param params: iterable of parameters to optimize or dicts defining
parameter groups.


+ 1
- 1
python_module/megengine/optimizer/internal.py View File

@@ -21,7 +21,7 @@ def add_update_fastpath(
beta: Union[Tensor, float, int] = 1.0,
bias: Union[Tensor, float, int] = 0.0
):
"""a fast-path ONLY used to update parameters in optimzier, since it
"""a fast-path ONLY used to update parameters in optimizer, since it
would bypass computing graph and launch dnn/add_update kernel directly,
it is more efficient than functional/add_update.
"""


+ 1
- 1
python_module/megengine/optimizer/lr_scheduler.py View File

@@ -4,7 +4,7 @@ from .optimizer import Optimizer


class LRScheduler(metaclass=ABCMeta):
r"""Base class for all lr_schedulers.
r"""Base class for all learning rate based schedulers.

:param optimizer: Wrapped optimizer.
:param current_epoch: The index of current epoch. Default: -1


+ 1
- 1
python_module/megengine/optimizer/sgd.py View File

@@ -17,7 +17,7 @@ class SGD(Optimizer):
r"""Implements stochastic gradient descent.

Nesterov momentum is based on the formula from
`On the importance of initialization and momentum in deep learning`.
`"On the importance of initialization and momentum in deep learning" <http://www.cs.toronto.edu/%7Ehinton/absps/momentum.pdf>`_ .

:param params: iterable of parameters to optimize or dicts defining
parameter groups.


Loading…
Cancel
Save