Why you can't skip this step

Every neuron computes a weighted sum of its inputs. On its own, that sum is just linear math, the kind of relationship a straight line can represent. If you stacked layers of neurons without anything else, the whole network would mathematically collapse into something no more powerful than a single linear equation, no matter how many layers you added. The activation function is what breaks that limitation. It introduces nonlinearity, which is what lets a network bend, curve, and represent the messy, non-straight-line patterns that real-world data actually has.

The common options

ReLU, short for rectified linear unit, is the default choice in most modern networks. It's almost embarrassingly simple: if the input is positive, pass it through unchanged; if it's negative, output zero. That simplicity makes it fast to compute and it tends to train well in deep networks.

Sigmoid squashes any input into a range between 0 and 1, which made it popular early on, especially for output layers in binary classification. Tanh does something similar but ranges between -1 and 1. Both have a real weakness: for very large or very small inputs, their output barely changes, which slows learning in deep networks. That's part of why ReLU largely replaced them in hidden layers.

Picking one without overthinking it

If you're building a standard feedforward or convolutional network, ReLU or one of its variants is a safe default for hidden layers. Your output layer activation depends on the task: sigmoid for binary classification, softmax for multi-class classification, and often no activation at all (or a linear one) for regression. This isn't a place to experiment heavily before you've gotten the basics right.

The quiet failure mode

What surprises beginners is that picking the wrong activation function rarely throws an error. Your model will train, the loss will go down, and everything looks fine, except it's stuck performing worse than it should. If your network seems to learn slowly or plateaus early, the activation function is one of the first things worth checking, right alongside your learning rate.