Comparison
Sigmoid/Logistic vs. TanH/Hyperbolic Tangent Functions
- The hyperbolic tangent (tanh) function outputs values in the range , while the sigmoid function outputs values in the range (0, 1).
- tanh generally works better than sigmoid as a hidden-layer activation function, because its output is centered around 0 rather than 0.5, which tends to make training/optimization faster.
- Sigmoid is still preferred for the output layer of binary classification models, since its (0, 1) range maps directly to a class probability.
0
1
Updated 2026-07-09
Contributors are:
Who are from:
Tags
Data Science
Related
Pros and Cons of Sigmoid/Logistic Function
Derivative of Sigmoid/Logistic Function
Question about sigmoid node
Sigmoid/Logistic vs. TanH/Hyperbolic Tangent Functions
Pros and Cons of Hyperbolic Tangent Function
Derivative of TanH/Hyperbolic Tangent Function
More on the Tanh function
You have built a network using the tanh activation for all the hidden units. You initialize the weights to relative large values, using np.random.randn(..,..)*1000. What will happen?
Sigmoid/Logistic vs. TanH/Hyperbolic Tangent Functions