Back to course

Activation Functions

Activation Functions

Activation functions introduce non-linearity into neural networks, enabling them to learn complex patterns that go beyond simple linear relationships.

Common Activation Functions

  • ReLU (Rectified Linear Unit): f(x) = max(0, x) — Simple and effective, the most widely used
  • Sigmoid: f(x) = 1/(1 + e⁻ˣ) — Outputs between 0 and 1, useful for probability
  • Tanh: f(x) = (eˣ - e⁻ˣ)/(eˣ + e⁻ˣ) — Outputs between -1 and 1
  • Softmax: Converts outputs to probability distribution — used in classification

Why Non-Linearity Matters

Without activation functions, a neural network is just a linear transformation — no matter how many layers you add. Non-linearity allows networks to learn complex decision boundaries and model real-world phenomena.

Sign in and enable JavaScript to track completion.