You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.nn.LeakyReLU.rst 881 B

1234567891011121314151617181920212223242526272829303132
  1. mindspore.nn.LeakyReLU
  2. =======================
  3. .. py:class:: mindspore.nn.LeakyReLU(alpha=0.2)
  4. Leaky ReLU激活函数。
  5. 该激活函数定义如下:
  6. .. math::
  7. \text{leaky_relu}(x) = \begin{cases}x, &\text{if } x \geq 0; \cr
  8. {\alpha} * x, &\text{otherwise.}\end{cases}
  9. 其中,:math:`\alpha` 表示 `alpha` 参数。
  10. 更多细节详见 `Rectifier Nonlinearities Improve Neural Network Acoustic Models <https://ai.stanford.edu/~amaas/papers/relu_hybrid_icml2013_final.pdf>`_。
  11. **参数:**
  12. **alpha** (`Union[int, float]`) – x<0时激活函数的斜率,默认值:0.2。
  13. **输入:**
  14. **x** (Tensor) - 计算LeakyReLU的任意维度的Tensor。
  15. **输出:**
  16. Tensor,数据类型和shape与 `x` 相同。
  17. **异常:**
  18. **TypeError** - `alpha` 不是浮点数或整数。