sigmoid函数的导数是 f ′ ( x ) = f ( x ) ( 1 − f ( x ) ) ​ f ^ { \prime } ( x ) =f ( x ) ( 1 - f ( x ) ) ​ f(x)=f(x)(1f(x))
推导过程如下:

1.先将f(x)稍微变形
f ( x ) = 1 1 + e − x = e x e x + 1 = 1 − ( e x + 1 ) − 1 ​ f ( x ) = \frac { 1 } { 1 + e ^ { - x } }=\frac { e ^ { x } } { e ^ { x } + 1 } = 1 - \left( e ^ { x } + 1 \right) ^ { - 1 }​ f(x)=1+ex1=ex+1ex=1(ex+1)1

2.求导:高等数学-符合求导法则
f ′ ( x ) = ( − 1 ) ( − 1 ) ( e x + 1 ) − 2 e x = ( 1 + e − x ) − 2 e − 2 x e x = ( 1 + e − x ) − 1 ⋅ e − x 1 + e − x = f ( x ) ( 1 − f ( x ) ) ​ \begin{aligned}f ^ { \prime } ( x )& = ( - 1 ) ( - 1 ) \left( e ^ { x } + 1 \right) ^ { - 2 } e ^ { x } \\ & = \left( 1 + e ^ { - x } \right) ^ { - 2 }e ^ { - 2 x } e ^ { x } \\ & = \left( 1 + e ^ { - x } \right) ^ { - 1 } \cdot \frac { e ^ { - x } } { 1 + e ^ { - x } } \\ & = f ( x ) ( 1 - f ( x ) ) \end{aligned}​ f(x)=(1)(1)(ex+1)2ex=(1+ex)2e2xex=(1+ex)11+exex=f(x)(1f(x))

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐