- 深度学习:卷积神经网络从入门到精通
- 李玉鑑
- 270字
- 2023-07-26 11:56:26
2.1 激活函数
在神经网络中,虽然理论上激活函数可以是线性的,比如恒等函数f(x) = x,但一般选为非线性的sigmoid函数:

或者双曲正切函数tanh:

此外,激活函数可以是硬限幅函数:

或者斜面函数:

当然,激活函数还有很多其他选择,比如,
校正线性单元(或修正线性单元)ReLU:

渗漏校正线性单元(或渗漏修正线性单元)LReLU:

其中,a∈(0, 1)是一个固定值。如果按某个均匀分布取随机值,则称为RReLU(Ramdomized LReLU)。
参数校正线性单元(或参数修正线性单元)PReLU:

其中,a≤1是一个可调参数,具体值需要通过学习得到。
指数线性单元ELU(其中a≥0是一个可调参数):

软加函数softplus:

最大输出函数maxout:

软最大输出函数softmax:
