jax.nn.leaky_relu#

jax.nn.leaky_relu(x, negative_slope=0.01)[原始碼]#

Leaky ReLU 整流線性單元激活函數。

計算逐元素函數

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

其中 \(\alpha\) = negative_slope

參數:
  • x (ArrayLike) – 輸入陣列

  • negative_slope (ArrayLike) – 指定負斜率的陣列或純量 (預設值:0.01)

傳回值:

一個陣列。

傳回類型:

Array

參見

relu()