Finally, we have another function, called the Hyperbolic Tangent Activation (tanh) function, which looks as follows:
Fig 2.16: Hyperbolic tangent
The tanh function is very similar to the sigmoid function; the range of a tanh function is (-1,1). Tanh functions are also S-shaped, like sigmoid functions. The advantage of the tanh function is that a positive will be mapped as strongly positive, a negative will be mapped as strongly negative, and 0 will be mapped to 0, as shown in Fig 2.16.
For more information about the performance of the hyperbolic function (tanh), refer to http://proceedings.mlr.press/v15/glorot11a/glorot11a.pdf.
In the next section of this chapter, we will learn about the cost function.