在计算网络中, 一个节点的激活函数定义了该节点在给定的输入或输入的集合下的输出。标准的计算机芯片电路可以看作是根据输入得到开(1)或关(0)输出的數位電路激活函数。这与神经网络中的线性感知机的行为类似。然而,只有非線性激活函数才允許這種網絡僅使用少量節點來計算非平凡問題。 在人工神經網絡中,這個功能也被稱為傳遞函數。
单变量输入激活函數
| f'(x)=\frac{1}{(1+|x|)^2}
| (-1,1)
| C^1
|
|
|
|-
| 反平方根函數 (ISRU)
|
| f(x) = \frac{x}{\sqrt{1 + \alpha x^2}}
| f'(x) = \left(\frac{1}{\sqrt{1 + \alpha x^2}}\right)^3
| \left(-\frac{1}{\sqrt{\alpha}},\frac{1}{\sqrt{\alpha}}\right)
| C^\infty
|
|
|
|-
|線性整流函數 (ReLU)
|
| f(x) = \begin{cases}
0 & \text{for } x
| f'(x) = \begin{cases}
0 & \text{for } x
| [0,\infty)
| C^0
|
|
|
|-
|帶泄露線性整流函數 (Leaky ReLU)
|
| f(x) = \begin{cases}
0.01x & \text{for } x
| f'(x) = \begin{cases}
0.01 & \text{for } x
| (-\infty,\infty)
| C^0
|
|
|
|-
| 參數化線性整流函數 (PReLU)
|
| f(\alpha,x) = \begin{cases}
\alpha x & \text{for } x
| f'(\alpha,x) = \begin{cases}
\alpha & \text{for } x
| (-\infty,\infty)
| C^0
|
|
|
|-
|帶泄露隨機線性整流函數 (RReLU)
|
| f(\alpha, x) = \begin{cases}
\alpha x & \text{for } x
| f'(\alpha, x) = \begin{cases}
\alpha & \text{for } x
| (-\infty,\infty)
| C^0
|
|
|
|-
| 指數線性函數 (ELU)
|
| f(\alpha,x) = \begin{cases}
\alpha(e^x - 1) & \text{for } x
| f'(\alpha,x) = \begin{cases}
f(\alpha,x) + \alpha & \text{for } x
| (-\alpha,\infty)
| \begin{cases}
C_ 1
& \text{when }
\alpha=1
\\
C_0 & \text{otherwise }
\end{cases}
|
|
|
|-
| 擴展指數線性函數 (SELU)
|
| f(\alpha,x) = \lambda \begin{cases}
\alpha(e^x - 1) & \text{for } x
with \lambda = 1.0507 and \alpha = 1.67326
| f'(\alpha,x) = \lambda \begin{cases}
\alpha(e^x) & \text{for } x
| (-\lambda\alpha,\infty)
| C^0
|
|
|
|-
| S 型線性整流激活函數 (SReLU)
|
| f_{t_l,a_l,t_r,a_r}(x) = \begin{cases}
t_l + a_l (x - t_l) & \text{for } x \le t_l\\
x & \text{for } t_l
t_l, a_l, t_r, a_r are parameters.
| f'_{t_l,a_l,t_r,a_r}(x) = \begin{cases}
a_l & \text{for } x \le t_l\\
1 & \text{for } t_l
| (-\infty,\infty)
| C^0
|
|
|
|-
| 反平方根線性函數 (ISRLU)
|
| f(x) = \max(0,x) + \sum_{s=1}^{S}a_i^s \max(0, -x + b_i^s)
| f'(x) = H(x) - \sum_{s=1}^{S}a_i^s H(-x + b_i^s)
| (-\infty,\infty)
| C^0
|
|
|
|-
| SoftPlus 函數
|
| f(x)=\ln(1+e^x)
| f'(x)=\frac{1}{1+e^{-x}}
| (0,\infty)
| C^\infty
|
|
|
|-
| 彎曲恆等函數
|
| f(x)=\frac{\sqrt{x^2 + 1} - 1}{2} + x
| f'(x)=\frac{x}{2\sqrt{x^2 + 1}} + 1
| (-\infty,\infty)
| C^\infty
|
|
|
|-
| S 型线性加权函数 (SiLU) (也被稱為Swish)
|
| f(x)=x\cdot\sigma(x)
| f'(x)=f(x)+\sigma(x)(1-f(x))
| [\approx-0.28,\infty)
| C^\infty
|
|
|
|-
| 软指数函數
|
| f(\alpha,x) = \begin{cases}
-\frac{\ln(1-\alpha (x + \alpha))}{\alpha} & \text{for } \alpha 0\end{cases}
| f'(\alpha,x) = \begin{cases}
\frac{1}{1-\alpha (\alpha + x)} & \text{for } \alpha
| (-\infty,\infty)
| C^\infty
|
|
|
|-
|正弦函數
|
| f(x)=\sin(x)
| f'(x)=\cos(x)
| [-1,1]
| C^\infty
|
|
|
|-
|Sinc 函數
|
| f(x)=\begin{cases}
1 & \text{for } x = 0\\
\frac{\sin(x)}{x} & \text{for } x \ne 0\end{cases}
| f'(x)=\begin{cases}
0 & \text{for } x = 0\\
\frac{\cos(x)}{x} - \frac{\sin(x)}{x^2} & \text{for } x \ne 0\end{cases}
| [\approx-0.217234,1]
| C^\infty
|
|
|
|-
|高斯函數
|
| f(x)=e^{-x^2}
| f'(x)=-2xe^{-x^2}
| (0,1]
| C^\infty
|
|
|
|}
说明
:若一函数是连续的,则称其为C^0函数;若一函数n阶可导,并且其n阶导函数连续,则为C^n函数(n\geq 1);若一函数对于所有n都属于C^n函数,则称其为C^\infty函数,也称光滑函数。
:此處是單位階躍函數。
:是在訓練時間從均勻分佈中抽取的隨機變量,並且在測試時間固定為分佈的期望值。
:此處\sigma是邏輯函數。
多变量输入激活函数
说明
此處是克羅內克δ函數。
參見
*邏輯函數
*線性整流函數
*Softmax函數
*人工神經網路
*深度學習
參考資料
评论 (0)