Compute the derivative mask of ReLU: 1 where the input is strictly positive and 0 elsewhere (including at 0).
Implement solve(x).
Returns. Return a float NumPy array of 0.0 and 1.0 with the same shape as x.
Example 1
Input:
solve([-2, 0, 3])
Output:
[0.0, 0.0, 1.0]
Example 2
Input:
solve([[1.0, -1.0], [0.5, 0.0]])
Output:
[[1.0, 0.0], [1.0, 0.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.