Each unit's pre-activation is
h =
s·
z for a fixed standard normal
z, so the slider stretches the same twenty units apart or squeezes them together; in a network,
s is what the weight scale controls (
where the n comes from shows how
n·σ
w² sets it). Every tangent is drawn the same length, so its angle is its slope: tanh′(
h) = 1 − tanh²(
h), which is 1 at
h = 0 and below 0.01 once |
h| > 3.
Big inputs: the outputs are pinned near ±1 and still carry a signal, but the slopes are near 0, so almost no gradient gets back through, which is
saturation.
Small inputs: every slope is nearly 1, so tanh passes gradients through untouched, but the outputs all huddle near 0, a signal that has all but vanished. The h axis is fixed at −5 to 5; units beyond it are pinned to the edge and counted. The
chain-rule demo shows what these slopes do once they multiply through several layers.