What is the role of an activation function in a neural network?
- Exam domain
- Deep learning foundations
- Difficulty
- Easy
- In this mock
- 5 questions on this domainPractise this domain
Why C is the answer
It adds non-linearity so the network can learn complex patterns
Without activation functions, any stack of layers collapses into one linear function. Activations such as ReLU add the non-linearity that lets deep networks model complex patterns.
Remember: Activations add non-linearity.
In detail
- Activation functions add non-linearity.
- ReLU in hidden layers, softmax for class probabilities.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. It splits the data set into batches before each training epoch startsWrong
Batching is a data loading step.
B. It saves the trained weights to disk after training endsWrong
Saving weights is not part of the network's maths.
C. It adds non-linearity so the network can learn complex patternsRight
Activations add non-linearity.
D. It decides how many layers the network gets during designWrong
The number of layers is a design choice made before training.
Use case
An illustrative scenario, not a real incident.
Illustrative: replacing ReLU with no activation turns a deep image model into a linear model, and its accuracy drops sharply.
See it in different ways
flowchart LR S0["Weighted sum of inputs"] --> S1["Add bias"] --> S2["Activation function"] --> S3["Output"]
How to read this chart
- Read it in order: Weighted sum of inputs, then Add bias, then Activation function, then Output.
mindmap
root(("Activations"))
n1["ReLU"]
n2["Hidden layers"]
n3["Sigmoid"]
n4["Binary output"]
n5["Softmax"]
n6["Class probabilities"]How to read this chart
- The centre is "Activations".
- "ReLU" covers "Hidden layers".
- "Sigmoid" covers "Binary output".
- "Softmax" covers "Class probabilities".