mlx.nn.selu

目录

mlx.nn.selu#

class selu(x)#

应用缩放指数线性单元(Scaled Exponential Linear Unit)。

\[\begin{split}\text{selu}(x) = \begin{cases} \lambda x & \text{如果 } x > 0 \\ \lambda \alpha (\exp(x) - 1) & \text{如果 } x \leq 0 \end{cases}\end{split}\]

其中 \(\lambda = 1.0507\)\(\alpha = 1.67326\)

另请参阅 elu()