mindspore/docs/api/api_python/mindspore.ops.func_csr_soft...

22 lines
634 B
ReStructuredText
Executable File
Raw 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.ops.csr_softsign
===========================
.. py:function:: mindspore.ops.csr_softsign(x: CSRTensor)
Softsign激活函数。
Softsign函数定义为
.. math::
\text{SoftSign}(x) = \frac{x}{1 + |x|}
参数:
- **x** (CSRTensor) - shape为 :math:`(N, *)` 的CSRTensor其中 :math:`*` 表示任意个数的维度。它的数据类型必须为float16或float32。
返回:
CSRTensor数据类型和shape与 `x` 相同。
异常:
- **TypeError** - `x` 不是CSRTensor。
- **TypeError** - `x` 的数据类型既不是float16也不是float32。