OpenAI-inspired neural-network experiment needs a simple nonlinear activation between two learned transformations. You need to apply ReLU elementwise so the team can verify the forward-pass behavior before moving to a larger architecture.
Replace every negative entry with 0 and keep the others: max(0,x) element-wise.
Implement solve(x).
Returns. Return a float NumPy array of the same shape.
Example 1
Input:
solve([-2, 0, 3])
Output:
[0.0, 0.0, 3.0]
Example 2
Input:
solve([[1.5, -0.5], [-3.0, 4.0]])
Output:
[[1.5, 0.0], [0.0, 4.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.