The Differential answer,i calculated, is not the same as the solution

48 Views Asked by At

The question is on first picuture,and the part of solution is on the second picture.I am not quite understand the second picture meaning

(1) enter image description here

(2)

enter image description here

The differential of $g(z)$ ,$g'(z)$, should be $\frac{-e^{-z}}{(1+e^{-z})^2}$,why is the $g'(z)$ equal to $a_i^{(l)}(1-a_i^{(l)})$?

1

There are 1 best solutions below

0
On BEST ANSWER

$g(z)=\frac{1}{1+e^{-z}}$,then $$g'(z)=-(1+e^{-z})^{-2}(-e^{-z})=\frac{e^{-z}}{(1+e^{-z})^2}$$ Notice that there is no negative sign.

\begin{align} g'(z) &= \frac{e^{-z}}{(1+e^{-z})^2} \\ &=\frac{1}{1+e^{-z}}\cdot \frac{e^{-z}}{1+e^{-z}} \\ &= a\cdot \left(1 - \frac{1}{1+e^{-z}}\right)\\ &= a(1-a) \end{align}

where I let $a=g(z)$.