# Method 1 def ReLU(x): return max(x,0) # Method 2 by a lambda function lambda x:max(x,0)
Here is what the above code is Doing:
1. We have defined a function named ReLU.
2. The function takes a single argument, x.
3. The function returns the maximum of x and 0.
4. We have defined a lambda function that takes a single argument, x.
5. The lambda function returns the maximum of x and 0.