推导sigmoid函数的导数表达式
时间: 2023-07-11 15:05:07 浏览: 261
激活函数在神经网络中应用,sigmoid导数证明sigmoid*(1-sigmoid)
sigmoid 函数的表达式为:
$$\sigma(x) = \frac{1}{1+e^{-x}}$$
其导数可以通过链式法则推导得到:
$$\begin{aligned}
\frac{d\sigma(x)}{dx} &= \frac{d}{dx}\left(\frac{1}{1+e^{-x}}\right)\\
&= \frac{d}{du}\left(\frac{1}{u}\right) \cdot \frac{du}{dx}, \quad u = 1+e^{-x}\\
&= -\frac{1}{u^2} \cdot \frac{d}{dx}(1+e^{-x})\\
&= -\frac{1}{(1+e^{-x})^2} \cdot \frac{d}{dx}(1+e^{-x})\\
&= -\frac{1}{(1+e^{-x})^2} \cdot (-e^{-x})\\
&= \frac{e^{-x}}{(1+e^{-x})^2}\\
&= \frac{1}{1+e^{-x}}\cdot\frac{e^{-x}}{1+e^{-x}}\\
&= \sigma(x)\cdot(1-\sigma(x))
\end{aligned}$$
因此,sigmoid 函数的导数表达式为:
$$\frac{d\sigma(x)}{dx}=\sigma(x)\cdot(1-\sigma(x))$$
阅读全文