Loading...
Compute the derivative of the Sigmoid function given the activation output.
The Sigmoid function is defined as: σ(z)=1+e−z1
A useful property is that its derivative can be computed directly from the output:
This makes backpropagation efficient since we already have the sigmoid output from the forward pass.
Write a function sigmoid_derivative(sigmoid_output) that returns the gradient values for each element.
Return a list of floats representing the derivatives. Round each value to 4 decimal places.
sigmoid_output=[0.5, 0.8]
[0.25, 0.16]
For 0.5: 0.5 × (1 - 0.5) = 0.5×0.5 = 0.25. For 0.8: 0.8 × (1 - 0.8) = 0.8×0.2 = 0.16.