AI engineering glossary · Deep learning core
What is tanh?
Tanh (also called Hyperbolic tangent): The hyperbolic tangent activation, which squashes any input into the range -1 to 1 with a smooth S-shaped curve. Because its output is centred on zero it often trains better than sigmoid in hidden layers, but it still flattens out for large inputs.
Tanh: an example
tanh(0) = 0, tanh(2) is about 0.96 and tanh(-2) about -0.96.
Related terms
More Deep learning core terms
- Teacher forcing
- Training loop
- Universal approximation theorem
- Validation loss
- Vanishing gradient
- Weight decay
- Weight initialisation
- Weight normalisation
Where you learn it
Tanh is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.