Write a python function that implements the ReLU function
Topic: Write a python function that implements the ReLU function
Solution
def relu(arr): return [x if x > 0 else 0 for x in arr]
List all Python Programs
Solution
def relu(arr): return [x if x > 0 else 0 for x in arr]