jax.nn.leaky_relu#

jax.nn.leaky_relu(x, negative_slope=0.01)[源代码]#

Leaky 整流线性单元激活函数。

计算逐元素函数

\[\begin{split}\mathrm{leaky\_relu}(x) = \begin{cases} x, & x \ge 0\\ \alpha x, & x < 0 \end{cases}\end{split}\]

其中 \(\alpha\) = negative_slope

参数
  • x (类数组) – 输入数组

  • negative_slope (类数组) – 指定负斜率的数组或标量 (默认值:0.01)

返回

一个数组。

返回类型

数组

另请参阅

relu()