Browse Source

modify comments of optimizer

tags/v1.6.0
王南 4 years ago
parent
commit
033ebf00a8
10 changed files with 25 additions and 25 deletions
  1. +3
    -3
      mindspore/nn/optim/ada_grad.py
  2. +6
    -6
      mindspore/nn/optim/adam.py
  3. +2
    -2
      mindspore/nn/optim/ftrl.py
  4. +2
    -2
      mindspore/nn/optim/lamb.py
  5. +2
    -2
      mindspore/nn/optim/lazyadam.py
  6. +2
    -2
      mindspore/nn/optim/momentum.py
  7. +2
    -2
      mindspore/nn/optim/optimizer.py
  8. +2
    -2
      mindspore/nn/optim/proximal_ada_grad.py
  9. +2
    -2
      mindspore/nn/optim/rmsprop.py
  10. +2
    -2
      mindspore/nn/optim/sgd.py

+ 3
- 3
mindspore/nn/optim/ada_grad.py View File

@@ -54,7 +54,7 @@ class Adagrad(Optimizer):
\end{array}

:math:`h` represents the cumulative sum of gradient squared,
:math:`g` represents `gradients`,
:math:`g` represents `grads`,
:math:`lr` represents `learning_rate`,
:math:`w` represents `params`.

@@ -65,8 +65,8 @@ class Adagrad(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 6
- 6
mindspore/nn/optim/adam.py View File

@@ -221,8 +221,8 @@ class Adam(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.

@@ -414,8 +414,8 @@ class AdamWeightDecay(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", and "order_params"
are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", and "order_params"
are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.

@@ -553,8 +553,8 @@ class AdamOffload(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", and "order_params"
are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", and "order_params"
are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 2
- 2
mindspore/nn/optim/ftrl.py View File

@@ -113,8 +113,8 @@ class FTRL(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "weight_decay", "grad_centralization" and "order_params" are
the keys can be parsed.
`params` is a list of `dict`, the string "params", "weight_decay", "grad_centralization" and "order_params"
are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 2
- 2
mindspore/nn/optim/lamb.py View File

@@ -209,8 +209,8 @@ class Lamb(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 2
- 2
mindspore/nn/optim/lazyadam.py View File

@@ -139,8 +139,8 @@ class LazyAdam(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 2
- 2
mindspore/nn/optim/momentum.py View File

@@ -66,8 +66,8 @@ class Momentum(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 2
- 2
mindspore/nn/optim/optimizer.py View File

@@ -83,8 +83,8 @@ class Optimizer(Cell):
LearningRateSchedule with step as the input to get the learning rate of current step.

parameters (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`parameters` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 2
- 2
mindspore/nn/optim/proximal_ada_grad.py View File

@@ -83,8 +83,8 @@ class ProximalAdagrad(Optimizer):
Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
- params: Required. Parameters in current group. The value must be a list of `Parameter`.


+ 2
- 2
mindspore/nn/optim/rmsprop.py View File

@@ -90,8 +90,8 @@ class RMSProp(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "weight_decay", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



+ 2
- 2
mindspore/nn/optim/sgd.py View File

@@ -59,8 +59,8 @@ class SGD(Optimizer):

Args:
params (Union[list[Parameter], list[dict]]): Must be list of `Parameter` or list of `dict`. When the
`parameters` is a list of `dict`, the "params", "lr", "grad_centralization" and
"order_params" are the keys can be parsed.
`params` is a list of `dict`, the string "params", "lr", "grad_centralization" and
"order_params" are the keys can be parsed.

- params: Required. Parameters in current group. The value must be a list of `Parameter`.



Loading…
Cancel
Save