Skip to content
Lambdian

Activation function

The non-linear function applied by each neuron, such as ReLU, sigmoid or tanh.

Without activations, stacking layers would still give a linear model. Common choices:

  • ReLU max⁡(0,z)\max(0, z): cheap, does not saturate for positive inputs; the default for hidden layers.
  • Sigmoid 1/(1+e−z)1/(1+e^{-z}): squashes to (0, 1); used for binary outputs.
  • tanh: squashes to (−1, 1); common in recurrent networks.

Sigmoid and tanh saturate for large inputs, so their gradients vanish in deep networks, one reason ReLU took over.

See it in action