What is Activation function?
In Turkish: Aktivasyon fonksiyonu · Topic: Models and training
A mathematical operation that takes a neuron's weighted sum and turns it into its output, giving the network nonlinear behavior so it can learn complex patterns.
How does it work?
When a neuron adds up its inputs, the resulting number does not go straight to the next layer; it first passes through an activation function. This function can bend the number, squeeze it into a certain range, or set negative values to zero. Without it, a network would behave like a single linear operation no matter how many layers were stacked. Sigmoid, tanh and ReLU are the best-known examples. Which one is chosen depends on the type of network and the job of the layer.
Why does it matter?
The choice of activation function affects how well and how quickly a network learns. Simple functions such as ReLU played a big part in making deep networks trainable. The function used in the output layer also shapes the form of the model's answer, for instance whether it produces probabilities or classes.
Example
Using ReLU in a network's hidden layers and softmax in the output layer to produce class probabilities is a very common combination.
FAQ
Why is a nonlinear function needed?
Stacking linear operations still gives a linear result. A network like that cannot learn curved, complex relationships.
Which activation function is the best?
There is no single best one for every case. ReLU and its variants are common in hidden layers, but the choice depends on the task and the architecture.