Theory ofIntelligence
← PRACTICE/
Beginner
Deep Learning• Neural networks

Implement ReLU activation

Implement ReLU: ReLU(x) = max(0, x). Apply it to a list of numbers.

Input: One line of space-separated numbers.

Output: One line of space-separated numbers after applying ReLU (integers where applicable).

Example:

  • Input: -1 0 2 3
  • Output: 0 0 2 3
Sample Test Verification
2 Test Cases
Sample Input (stdin)
-1 0 2 3
Expected Output (stdout)
0 0 2 3
solution.py
Initializing Monaco Python Environment...
Input (stdin)
-1 0 2 3
Expected Output (stdout)
0 0 2 3