Derivatives of activation functions 激励函数的导数
Derivatives of Sigmod
sigmod=g(z)=11+e−z(1)
(1)
s
i
g
m
o
d
=
g
(
z
)
=
1
1
+
e
−
z
g′(z)=ddzg(z)=d(1+e−z)−1d(1+e−z)∗d(1+e−z)d(−z)∗d(−z)dz=−(1+e−z)−2∗e−z∗−1=1(1+e−z)∗e−z(1+e−z)=1(1+e−z)∗1+e−z−1(1+e−z)=1(1+e−z)∗(1−1(1+e−z))=g(z)∗(1−g(z))(2)
(2)
g
′
(
z
)
=
d
d
z
g
(
z
)
=
d
(
1
+
e
−
z
)
−
1
d
(
1
+
e
−
z
)
∗
d
(
1
+
e
−
z
)
d
(
−
z
)
∗
d
(
−
z
)
d
z
=
−
(
1
+
e
−
z
)
−
2
∗
e
−
z
∗
−
1
=
1
(
1
+
e
−
z
)
∗
e
−
z
(
1
+
e
−
z
)
=
1
(
1
+
e
−
z
)
∗
1
+
e
−
z
−
1
(
1
+
e
−
z
)
=
1
(
1
+
e
−
z
)
∗
(
1
−
1
(
1
+
e
−
z
)
)
=
g
(
z
)
∗
(
1
−
g
(
z
)
)
![这里写图片描述](https://i-blog.csdnimg.cn/blog_migrate/c2294481e8a126112cbdee45ebd4ce4d.jpeg)
Derivatives of tanh
sinh(z)=ez−e−z2(3)
(3)
s
i
n
h
(
z
)
=
e
z
−
e
−
z
2
cosh(z)=ez+e−z2(4)
(4)
c
o
s
h
(
z
)
=
e
z
+
e
−
z
2
ddzsinh(z)=ez+e−z2=cosh(z)(5)
(5)
d
d
z
s
i
n
h
(
z
)
=
e
z
+
e
−
z
2
=
c
o
s
h
(
z
)
ddzcosh(z)=ez−e−z2=sinh(z)(6)
(6)
d
d
z
c
o
s
h
(
z
)
=
e
z
−
e
−
z
2
=
s
i
n
h
(
z
)
tanh(z)=sinh(z)cosh(z)=g(z)=ez−e−zez+e−z(7)
(7)
t
a
n
h
(
z
)
=
s
i
n
h
(
z
)
c
o
s
h
(
z
)
=
g
(
z
)
=
e
z
−
e
−
z
e
z
+
e
−
z
g′(z)=ddz(sinh(z)cosh(z)−1)=ddzsinh(z)∗cosh(z)−1+sinh(z)∗ddcosh(z)cosh(z)−1∗ddzcosh(z)=1+sinh(z)∗−1cosh(z)2∗sinh(z)=1−tanh(z)2(8)
(8)
g
′
(
z
)
=
d
d
z
(
s
i
n
h
(
z
)
c
o
s
h
(
z
)
−
1
)
=
d
d
z
s
i
n
h
(
z
)
∗
c
o
s
h
(
z
)
−
1
+
s
i
n
h
(
z
)
∗
d
d
c
o
s
h
(
z
)
c
o
s
h
(
z
)
−
1
∗
d
d
z
c
o
s
h
(
z
)
=
1
+
s
i
n
h
(
z
)
∗
−
1
c
o
s
h
(
z
)
2
∗
s
i
n
h
(
z
)
=
1
−
t
a
n
h
(
z
)
2
![这里写图片描述](https://i-blog.csdnimg.cn/blog_migrate/f74b5f2887175b170a13c2e9599a5151.jpeg)
Derivatives of ReLU
ReLU=g(z)=max(0,z)(9)
(9)
R
e
L
U
=
g
(
z
)
=
m
a
x
(
0
,
z
)
g′(z)={01if z<0if z≥0(10)
(10)
g
′
(
z
)
=
{
0
i
f
z
<
0
1
i
f
z
≥
0
Leaky ReLU=g(z)=max(0.01z,z)(11)
(11)
L
e
a
k
y
R
e
L
U
=
g
(
z
)
=
m
a
x
(
0.01
z
,
z
)
g′(z)={0.011if z<0if z≥0(12)
(12)
g
′
(
z
)
=
{
0.01
i
f
z
<
0
1
i
f
z
≥
0
![这里写图片描述](https://i-blog.csdnimg.cn/blog_migrate/7fcff54a10baefe2b76d180abc43da3e.jpeg)