diff --git a/mindspore/nn/layer/activation.py b/mindspore/nn/layer/activation.py index 384f625133..8135e61a3b 100644 --- a/mindspore/nn/layer/activation.py +++ b/mindspore/nn/layer/activation.py @@ -454,7 +454,7 @@ class HSigmoid(Cell): Hard sigmoid is defined as: .. math:: - \text{hsigmoid}(x_{i}) = max(0, min(1, \frac{2 * x_{i} + 5}{10})), + \text{hsigmoid}(x_{i}) = max(0, min(1, \frac{x_{i} + 3}{6})), where :math:`x_{i}` is the :math:`i`-th slice along the given dim of the input Tensor. diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py index dd868eaf1c..36daa6abfb 100644 --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -498,7 +498,7 @@ class HSigmoid(PrimitiveWithInfer): Hard sigmoid is defined as: .. math:: - \text{hsigmoid}(x_{i}) = max(0, min(1, \frac{2 * x_{i} + 5}{10})), + \text{hsigmoid}(x_{i}) = max(0, min(1, \frac{x_{i} + 3}{6})), where :math:`x_{i}` is the :math:`i`-th slice along the given dim of the input Tensor.