mindspore/docs/api/api_python/nn/mindspore.nn.HSigmoid.rst

28 lines
623 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.nn.HSigmoid
=============================
.. py:class:: mindspore.nn.HSigmoid
逐元素应用Hard Sigmoid激活函数。
Hard Sigmoid定义为
.. math::
\text{HSigmoid}(input) =
\begin{cases}
0, & \text{ if } input \leq -3, \\
1, & \text{ if } input \geq +3, \\
input/6 + 1/2, & \text{ otherwise }
\end{cases}
HSigmoid函数图
.. image:: ../images/HSigmoid.png
:align: center
输入:
- **input** (Tensor) - 输入tensor。
输出:
Tensor输出tensor的数据类型和shape与输入相同。