tanh and saturation
You will learn
Why tanh is centred on zero, and where its slope falls so low that a unit stops learning.
tanh is a sigmoid stretched to -1..1 and centred on 0, so a layer of tanh units passes on values that average near zero, and its slope reaches 1 at the centre. It still saturates: at 2.5 the output is 0.9866 and the slope only 0.0266. The red band marks every input where the slope is under 0.1, beyond about 1.8 on either side, and a unit whose inputs live there barely learns. The spec tanh_activation.t27 computes the curve, the slope and its own batch, tanh of 0, 1 and 2: 0, 0.762 and 0.964.