mindspore/docs/api/api_python/ops/mindspore.ops.Softplus.rst

23 lines
706 B
ReStructuredText
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.Softplus
========================
.. py:class:: mindspore.ops.Softplus
Softplus激活函数。
Softplus为ReLU函数的平滑近似。可对一组数值使用来确保转换后输出结果均为正值。函数计算如下
.. math::
\text{output} = \log(1 + \exp(\text{x}))
输入:
- **input_x** (Tensor) - shape :math:`(N, *)` ,其中 :math:`*` 表示任意数量的附加维度数据类型支持float16或float32。
输出:
Tensor`input_x` 的shape和数据类型相同。
异常:
- **TypeError** - `input_x` 不是Tensor。
- **TypeError** - `input_x` 的数据类型非float16或float32。