Sigmoid and Tanh
Sigmoid and tanh are older, bounded activation functions that still matter conceptually.
The sigmoid function maps inputs to values between 0 and 1:
sigmoid(x) = 1 / (1 + exp(-x))
The tanh function maps inputs to values between -1 and 1.
Both functions are nonlinear. Both squash large positive or negative inputs into bounded ranges.
Useful intuition
Sigmoid is useful when you want a number that behaves like a soft yes/no quantity.
Tanh is centered around zero, so negative inputs produce negative outputs and positive inputs produce positive outputs.
In modern deep networks, ReLU-like activations often replaced sigmoid and tanh in hidden layers because they are less prone to saturation for positive values. But sigmoid and tanh remain important for understanding gates, probabilities, and historical neural networks.
Enter 1 if sigmoid outputs are always between 0 and 1, or 0 if they can be any real number.
Compute it first, then check your number.
HintThink bounded
Sigmoid squashes real inputs into a limited range.
SolutionWork it out
Sigmoid maps any real input to a value between 0 and 1.
Enter 1 if tanh can output negative values, or 0 if tanh is never negative.
Compute it first, then check your number.
HintCentered range
Tanh is centered around zero.
SolutionWork it out
Tanh outputs values between -1 and 1, so it can be negative.