0%

Sigmoid函数求导

\begin{aligned}
Sigmoid(x) = f(x) &= \frac{1}{1 + e^{-x}} \\
\end{aligned}

\begin{aligned}
f’(x) &= ((1 + e^{-x})^{-1})’ \\
&=-(1 + e^{-x}) ^ {-2} \times (1 + e^{-x})’ \\
&=-(1 + e^{-x}) ^ {-2} \times e^{-x} \times (-x)’ \\
&=(1 + e^{-x}) ^ {-2} \times e^{-x} \\
&=\frac {e^{-x}} {(1 + e^{-x}) ^ {-2}} \\
&=\frac {1} {1 + e^{-x}} \times \frac {1 + e^{-x} - 1} {1 + e^{-x}} \\
&=f(x) * (1 - f(x))
\end{aligned}