O'Reilly logo

Hands-On Natural Language Processing with Python by Rajalingappaa Shanmugamani, Rajesh Arumugam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hyperbolic tangent

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. 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required