Skip to content

What is Activation Function?

An activation function is a mathematical operation applied to the output of a neuron in a neural network that decides whether the neuron should 'fire' and pass on a signal.

It takes the weighted sum of inputs plus bias and transforms it into an output value, typically between a certain range like 0-1 or -1 to 1.

Without activation functions, a neural network would behave like a simple linear model and could not learn complex patterns in data.

Popular examples include ReLU, which outputs the input if positive or zero otherwise, and Sigmoid, which squashes values into a probability-like range.

Example

In a photo classifier, an activation function might turn a neuron's calculation about edge patterns into a 'yes' signal only if the pattern strongly matches an eye feature.

Why it matters

Activation functions enable deep networks to model non-linear relationships, which is essential for modern AI tasks like image recognition and language translation.

Frequently asked questions

Linear functions alone cannot capture complex data patterns, so non-linear activations allow networks to learn intricate relationships.