Hyperbolic Tangent
The hyperbolic tangent (tanh) is a sigmoid function centered at the origin. It has a bounded output range of between -1 and 1.
We can define tanh using the following equation:
The derivative of the tanh function is:
Computing the hyperbolic tangent in numpy
import numpy as np
print(f"tanh(0) = {np.tanh(0)}")
tanh(0) = 0.0
This page references the following sources: