Tanh Activation Function

The tanh (Hyperbolic Tangent) activation function is the hyperbolic analogue of the tan circular function used throughout trigonometry.

The equation for tanh is:

Compared to the Sigmoid functiontanh produces a more rapid rise in result values.

The derivative of tanh is:

Common negative comments about tanh activation functions include:

  • Tanh can saturate and kill gradients. Gradients (change) at the tails of -1 and 1 are almost zero.

References