SyntaxFix
Write A Post
Hire A Developer
Questions
numpy didn't have the function of relu, but you define it by yourself as follow:
def relu(x): return np.maximum(0, x)
for example:
arr = np.array([[-1,2,3],[1,2,3]]) ret = relu(arr) print(ret) # print [[0 2 3] [1 2 3]]