Tanh

Problem

The hyperbolic tangent is another commonly used activation function in neural networks. The function is given by \begin{align} \textrm{tanh}(x) = \frac{e^{x}-e^{-x}}{e^x + e^{-x}} \end{align} Show that the function is related to the sigmoid function by \begin{align} \textrm{tanh}(x) = 2\sigma(2x) - 1. \end{align}

Solution

show