The sigmoid: a number into a probability
You will learn
How the sigmoid maps any input to a probability, and why its slope limits deep networks.
The sigmoid 1 / (1 + e^-x) squeezes the whole number line into 0 to 1, which is why it reads as a probability: 2 becomes 0.8808 and -4 becomes 0.018. Its slope is s (1 - s), computed from the output s itself, and it is largest at 0, where it is 0.25; at x = 8 it is 0.000335. A gradient that passes back through a stack of sigmoids is multiplied by at most 0.25 at each one, which is why deep sigmoid networks trained slowly. The spec sigmoid_activation.t27 computes the curve and the slope.