Hyperbolic tangent activation transforms the input into values ranging from -1 to 1. The following is a graph of a hyperbolic tangent function:
As shown in the preceding graph, this function is similar to a sigmoid function, but the y values vary from -1 to 1. The main advantage of the hyperbolic tangent function is that the values don't diminish for a negative x. The hyperbolic function also has a higher gradient over its range compared to a sigmoid function. This activation function is also referred to as a tanh function.