赞
踩
一个节点的激活函数(Activation Function)定义了该节点在给定的输入或输入的集合下的输出。神经网络中的激活函数用来提升网络的非线性(只有非线性的激活函数才允许网络计算非平凡问题),以增强网络的表征能力。对激活函数的一般要求是:必须非常数、有界、单调递增并且连续,并且可导。
在实际选择激活函数时并不会严格要求可导,只需要激活函数几乎在所有点可导即可,即在个别点不可导是可以接受的。另外,其导数尽可能的大可以帮助加速训练神经网络,否则导数过小会导致网络无法继续训练下去。
下面是不同的激活函数的函数公式,图像和导数公式,图像。
f
(
x
)
=
x
f
′
(
x
)
=
1
f(x)=x \qquad\qquad\qquad f^{'}(x)=1
f(x)=xf′(x)=1
f
(
x
)
=
{
0
,
x
<
0
1
,
x
≥
0
f
′
(
x
)
=
{
0
,
x
≠
0
?
,
x
=
0
f(x)=\left\{
f
(
x
)
=
σ
(
x
)
=
1
1
+
e
−
x
f
′
(
x
)
=
f
(
x
)
(
1
−
f
(
x
)
)
f(x)=\sigma(x)=\frac{1}{1+e^{-x}}\qquad\qquad f^{'}(x)=f(x)(1-f(x))
f(x)=σ(x)=1+e−x1f′(x)=f(x)(1−f(x))
f
(
x
)
=
t
a
n
h
(
x
)
=
(
e
x
−
e
−
x
)
e
x
+
e
−
x
f
′
(
x
)
=
1
−
f
(
x
)
2
f(x)=tanh(x)=\frac{(e^x-e^{-x})}{e^x+e^{-x}}\qquad \qquad f^{'}(x)=1-f(x)^2
f(x)=tanh(x)=ex+e−x(ex−e−x)f′(x)=1−f(x)2
f
(
x
)
=
t
a
n
−
1
(
x
)
f
′
(
x
)
=
1
x
2
+
1
f(x)=tan^{-1}(x)\qquad\qquad f^{'}(x)=\frac{1}{x^2+1}
f(x)=tan−1(x)f′(x)=x2+11
f
(
x
)
=
x
1
+
∣
x
∣
f
′
(
x
)
=
1
(
1
+
∣
x
∣
)
2
f(x)=\frac{x}{1+|x|}\qquad\qquad f^{'}(x)=\frac{1}{(1+|x|)^2}
f(x)=1+∣x∣xf′(x)=(1+∣x∣)21
f
(
x
)
=
x
1
+
α
x
2
f
′
(
x
)
=
(
1
1
+
α
x
2
)
3
f(x)=\frac{x}{\sqrt{1+\alpha x^2}}\qquad \qquad f^{'}(x)=(\frac{1}{\sqrt{1+\alpha x^2}})^3
f(x)=1+αx2
xf′(x)=(1+αx2
1)3
f
(
x
)
=
{
0
,
x
<
0
x
,
x
≥
0
f
′
(
x
)
=
{
0
,
x
<
0
1
,
x
≥
0
f(x)= \left\{
f
(
x
)
=
{
0.01
x
,
x
<
0
x
,
x
≥
0
f
′
(
x
)
=
{
0.01
,
x
<
0
1
,
x
≥
0
f(x)= \left\{
f
(
x
)
=
{
α
x
,
x
<
0
x
,
x
≥
0
f
′
(
x
)
=
{
α
,
x
<
0
1
,
x
≥
0
f(x)= \left\{
f
(
x
)
=
{
α
x
,
x
<
0
x
,
x
≥
0
f
′
(
x
)
=
{
α
,
x
<
0
1
,
x
≥
0
f(x)= \left\{
f
(
x
)
=
{
α
(
e
x
−
1
)
,
x
<
0
x
,
x
≥
0
f
′
(
x
)
=
{
f
(
α
,
x
)
+
α
,
x
<
0
1
,
x
≥
0
f(x)= \left\{
f
(
x
)
=
λ
{
α
(
e
x
−
1
)
,
x
<
0
x
,
x
≥
0
λ
=
1.0507
,
α
=
1.67326
f
′
(
x
)
=
λ
{
α
(
e
x
)
,
x
<
0
1
,
x
≥
0
f
t
l
,
a
l
,
t
r
,
a
r
(
x
)
=
{
t
l
+
a
l
(
x
−
t
l
)
,
x
≤
t
l
x
,
t
l
<
x
<
t
r
t
r
+
a
r
(
x
−
t
r
)
,
x
≥
t
r
t
l
,
a
l
,
t
r
,
a
r
为
参
数
f
t
l
,
a
l
,
t
r
,
a
r
′
(
x
)
=
{
a
l
,
x
≤
t
l
1
,
t
l
<
x
<
t
r
a
r
,
x
≥
t
r
f
(
x
)
=
{
x
1
+
α
x
2
,
x
<
0
x
,
x
≥
0
f
′
(
x
)
=
{
(
1
1
+
α
x
2
)
3
,
x
<
0
1
,
x
≥
0
f(x)= \left\{
f ( x ) = m a x ( 0 , x ) + ∑ s = 1 S a i s m a x ( 0 , − x + b i s ) f ′ ( x ) = H ( x ) − ∑ s = 1 S a i s H ( − x + b i s ) f(x)=max(0,x)+\sum_{s=1}^{S}a^s_{i}max(0,-x+b^s_i)\qquad\qquad f^{'}(x)=H(x)-\sum^{S}_{s=1}a^s_iH(-x+b^s_i) f(x)=max(0,x)+s=1∑Saismax(0,−x+bis)f′(x)=H(x)−s=1∑SaisH(−x+bis)
f
(
x
)
=
ln
(
1
+
e
x
)
f
′
(
x
)
=
e
x
1
+
e
x
f(x)=\ln(1+e^x) \qquad\qquad f^{'}(x)=\frac{e^x}{1+e^x}
f(x)=ln(1+ex)f′(x)=1+exex
f
(
x
)
=
x
2
+
1
−
1
2
+
x
f
′
(
x
)
=
x
2
x
2
+
1
+
1
f(x)=\frac{\sqrt{x^2+1}-1}{2}+x\qquad\qquad f^{'}(x)=\frac{x}{2\sqrt{x^2+1}}+1
f(x)=2x2+1
−1+xf′(x)=2x2+1
x+1
f
(
x
)
=
x
⋅
σ
(
x
)
f
′
(
x
)
=
f
(
x
)
+
σ
(
x
)
(
1
−
f
(
x
)
)
f(x)=x\cdot \sigma(x) \qquad\qquad f^{'}(x)=f(x)+\sigma(x)(1-f(x))
f(x)=x⋅σ(x)f′(x)=f(x)+σ(x)(1−f(x))
f
(
x
)
=
{
−
l
n
(
1
−
α
(
x
+
α
)
)
α
,
α
<
0
x
,
α
=
0
e
α
x
−
1
α
,
α
>
0
f
′
(
x
)
=
{
1
1
−
α
(
α
+
x
)
,
α
<
0
e
α
x
,
α
≥
0
f(x)= \left\{
f
(
x
)
=
s
i
n
(
x
)
f
′
(
x
)
=
c
o
s
(
x
)
f(x)= sin(x)\qquad\qquad f^{'}(x)=cos(x)
f(x)=sin(x)f′(x)=cos(x)
f
(
x
)
=
{
1
,
x
=
0
s
i
n
(
x
)
x
,
x
≠
0
f
(
x
)
=
{
0
,
x
=
0
c
o
s
(
x
)
x
−
s
i
n
(
x
)
x
,
x
≠
0
f(x)=\left\{
f
(
x
)
=
e
−
x
2
f
′
(
x
)
=
−
2
x
e
−
x
2
f(x)=e^{-x^2} \qquad\qquad f^{'}(x)=-2xe^{-x^2}
f(x)=e−x2f′(x)=−2xe−x2
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。