Update the Gradient
Apply what we have learned about sigmoids by updating the loss function.
We'll cover the following
Updating the loss function
Now that we have a brand-new loss function, let’s look up its gradient. Here is the partial derivative of the log loss with respect to the weight from the math textbooks:
This gradient might look familiar. In fact, it closely resembles the gradient of the mean squared error that we have used so far:
See how similar they are? This means that we can take our previous gradient()
function:
Get hands-on with 1400+ tech skills courses.