Share

activation_tanh

The Tanh activation function maps the input to values between -1 and 1, providing a scaled and shifted output that helps in normalizing the data flow in the network.

Equation

For an input vector x, the Tanh activation function computes:

output = output = (e^x - e^(-x)) / (e^x + e^(-x))

Inputs

x

The input vector to the Tanh activation function.

Outputs

output

The activated vector after applying the Tanh function.

Was this information helpful?