Skip to main content
AI & ML Output Prediction Medium +20 XP

Activation Function

What does ReLU return for input -3?

AI & MLRead-only
# ReLU(x) = max(0, x)
import numpy as np
print(np.maximum(0, -3))

What is the output?

Show answer and explanation

Answer: 0

ReLU (Rectified Linear Unit) returns max(0, x). For negative inputs it returns 0, for positive inputs it returns x.

Hint: ReLU clamps negatives to zero.

What this challenge tests

Output Prediction in AI & ML: neural-networks, activation.

Related challenges