神经网络的激活函数(三)ReLU和它的变种Leaky-ReLU、PReLU
本文我们介绍深度学习的功臣ReLU及其变种,它们在神经网络中的广泛应用,对于提高网络的性能和加速训练具有重要意义。
ReLU(Rectified Linear Unit,修正线性单元)激活函数是现代深度学习中最常用的激活函数之一。它的数学表达式为:
\[\text{ReLU}(x) = \max(0, x)\]2010年,由Vinod Nair和 Geoffrey Hinton在他们的论文《Rectified Linear Units Improve Restricted Boltzmann Machines》中展示了ReLU在深度神经网络中的有效性。自此,ReLU成为了深度学习中最流行的激活函数之一。
优点
缺点
Leaky ReLU(Leaky Rectified Linear Unit,带泄漏的修正线性单元)是ReLU激活函数的一种变体,它旨在解决ReLU的“Dying ReLU”问题。Dying ReLU问题是指在训练过程中,某些神经元可能永远不会被激活(即输入始终为负值),导致这些神经元在整个训练过程中都没有贡献。
Leaky ReLU的数学表达式为:
\[\text{Leaky ReLU}(x) = \begin{cases} x & \text{if } x \geq 0 \\ \alpha x & \text{if } x < 0 \end{cases}\]其中,$\alpha$ 是一个小的正数,通常取值在0.01左右。
2013年,Leaky ReLU首次出现在论文《Rectifier Nonlinearities Improve Neural Network Acoustic Models》中,该论文由Andrew L. Maas、Awni Y. Hannun和Andrew Y. Ng撰写.
PReLU(Parametric Rectified Linear Unit,参数化修正线性单元)是ReLU激活函数的另一种变体,它通过引入一个可学习的参数来控制负区间的斜率。PReLU旨在进一步改进ReLU及其变体(如Leaky ReLU)的性能。
PReLU的数学表达式为:
\[\text{PReLU}(x) = \begin{cases} x & \text{if } x \geq 0 \\ \alpha x & \text{if } x < 0 \end{cases}\]其中,$\alpha$ 是一个可学习的参数,而不是一个固定的常数。
PReLU是由何凯明(Kaiming He)、张翔(Xiangyu Zhang)、任少卿(Shaoqing Ren)和孙剑(Jian Sun)在2015年的论文《Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification》中提出的。
[1] Rectified Linear Units Improve Restricted Boltzmann Machines
[2] Rectifier Nonlinearities Improve Neural Network Acoustic Models
[3] Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification
仓库上有原始的Markdown文件,完全开源,欢迎大家Star和Fork!