From 033ebf00a80cf829feb1268ebabe779635806904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=97?= Date: Wed, 17 Nov 2021 13:01:47 +0800 Subject: [PATCH] modify comments of optimizer --- mindspore/nn/optim/ada_grad.py | 6 +++--- mindspore/nn/optim/adam.py | 12 ++++++------ mindspore/nn/optim/ftrl.py | 4 ++-- mindspore/nn/optim/lamb.py | 4 ++-- mindspore/nn/optim/lazyadam.py | 4 ++-- mindspore/nn/optim/momentum.py | 4 ++-- mindspore/nn/optim/optimizer.py | 4 ++-- mindspore/nn/optim/proximal_ada_grad.py | 4 ++-- mindspore/nn/optim/rmsprop.py | 4 ++-- mindspore/nn/optim/sgd.py | 4 ++-- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/mindspore/nn/optim/ada_grad.py b/mindspore/nn/optim/ada_grad.py index c0b40aff12..fe10087643 100644 --- a/mindspore/nn/optim/ada_grad.py +++ b/mindspore/nn/optim/ada_grad.py @@ -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`. diff --git a/mindspore/nn/optim/adam.py b/mindspore/nn/optim/adam.py index afe9d3cd66..1cec76c740 100755 --- a/mindspore/nn/optim/adam.py +++ b/mindspore/nn/optim/adam.py @@ -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`. diff --git a/mindspore/nn/optim/ftrl.py b/mindspore/nn/optim/ftrl.py index fa05520b3c..d1a0918989 100644 --- a/mindspore/nn/optim/ftrl.py +++ b/mindspore/nn/optim/ftrl.py @@ -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`. diff --git a/mindspore/nn/optim/lamb.py b/mindspore/nn/optim/lamb.py index bd6eae219d..c61230c3d4 100755 --- a/mindspore/nn/optim/lamb.py +++ b/mindspore/nn/optim/lamb.py @@ -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`. diff --git a/mindspore/nn/optim/lazyadam.py b/mindspore/nn/optim/lazyadam.py index 35da73b69e..551d7fb287 100644 --- a/mindspore/nn/optim/lazyadam.py +++ b/mindspore/nn/optim/lazyadam.py @@ -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`. diff --git a/mindspore/nn/optim/momentum.py b/mindspore/nn/optim/momentum.py index cd5fc37131..cf9763b614 100755 --- a/mindspore/nn/optim/momentum.py +++ b/mindspore/nn/optim/momentum.py @@ -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`. diff --git a/mindspore/nn/optim/optimizer.py b/mindspore/nn/optim/optimizer.py index 774f1d578a..504d0fb447 100644 --- a/mindspore/nn/optim/optimizer.py +++ b/mindspore/nn/optim/optimizer.py @@ -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`. diff --git a/mindspore/nn/optim/proximal_ada_grad.py b/mindspore/nn/optim/proximal_ada_grad.py index 7f3845e3d3..cc6f8ec78b 100644 --- a/mindspore/nn/optim/proximal_ada_grad.py +++ b/mindspore/nn/optim/proximal_ada_grad.py @@ -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`. diff --git a/mindspore/nn/optim/rmsprop.py b/mindspore/nn/optim/rmsprop.py index b3e30bc89b..a8e8bd4160 100644 --- a/mindspore/nn/optim/rmsprop.py +++ b/mindspore/nn/optim/rmsprop.py @@ -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`. diff --git a/mindspore/nn/optim/sgd.py b/mindspore/nn/optim/sgd.py index 771f4126c5..4a7b5dcd4f 100755 --- a/mindspore/nn/optim/sgd.py +++ b/mindspore/nn/optim/sgd.py @@ -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`.