Activation Functions
Sigmoid, ReLU, and Softmax explained.
Activation Functions is a free Learn AI with Python lesson on CoddyKit — lesson 2 of 5. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Learn AI with Python learning path, one of 5 lessons in the course, and your progress syncs across the web and the CoddyKit app.
1
Activation Functions
Activation functions are a critical part of neural networks. They determine whether a neuron should be activated based on the input it receives.
Without activation functions, the neural network would behave as a linear model, limiting its ability to learn complex patterns.

2
Types of Activation Functions
Common types of activation functions include:
- Sigmoid: Outputs values between 0 and 1.
- ReLU (Rectified Linear Unit): Outputs the input if it's positive, otherwise 0.
- Softmax: Converts outputs into probabilities for classification tasks.
3
Sigmoid Function
The sigmoid function maps any input value to a range between 0 and 1, making it suitable for binary classification.
Formula:
σ(x) = 1 / (1 + e^(-x))
It squashes large inputs and outputs values close to 0 or 1.
4
ReLU Function
The ReLU (Rectified Linear Unit) function is defined as:
ReLU(x) = max(0, x)
It outputs 0 for negative inputs and the input value itself for positive inputs. ReLU is computationally efficient and helps address the vanishing gradient problem.
5
Softmax Function
The softmax function is used in the output layer for multi-class classification. It converts raw scores into probabilities:
Softmax(x_i) = e^(x_i) / Σ(e^(x_j))
All output values are normalized to sum up to 1.
6
Choosing the Right Activation Function
The choice of activation function depends on the task:
- Sigmoid: For binary classification.
- ReLU: For hidden layers in deep networks.
- Softmax: For multi-class classification problems.
7
Advantages of Activation Functions
Activation functions enable neural networks to:
- Learn complex, non-linear patterns.
- Differentiate between inputs effectively.
- Adapt to various types of data and tasks.
8
Challenges with Activation Functions
Some issues include:
- Sigmoid: Can cause vanishing gradients during training.
- ReLU: Can lead to 'dead neurons' where some neurons stop learning.
- Softmax: Computationally expensive for large outputs.
9
10
Summary and Next Steps
In this lesson, we:
- Explored activation functions like Sigmoid, ReLU, and Softmax.
- Learned their roles and use cases in neural networks.
- Discussed their advantages and challenges.
Next, we will build a simple feedforward neural network and understand its structure and working.

Frequently asked questions
Is the “Activation Functions” lesson free?
Yes — the full text of “Activation Functions” is free to read here on the web, and the Learn AI with Python course includes 5 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Learn AI with Python course, upgrade to CoddyKit PRO.
What will I learn in “Activation Functions”?
Sigmoid, ReLU, and Softmax explained. You practise Learn AI with Python with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Learn AI with Python?
No prior experience is required. Learn AI with Python on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 5, so you can start here or from the beginning and move at your own pace.
How long does the “Activation Functions” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Learn AI with Python lesson?
Yes. Every Learn AI with Python lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.