Apply training-mode batch normalisation to a 2-D batch X of shape (batch, features): for each feature compute the mean and population variance over the batch, normalise with var+ε, then apply the per-feature scale gamma and shift beta. eps defaults to 10−5.
Implement solve(X, gamma, beta, eps=1e-5).
Returns. Return a float NumPy array with the shape of X.
Example 1
Input:
solve([[1, 2], [3, 4]], [1, 2], [0, 1], eps=0)
Output:
[[-1.0, -1.0], [1.0, 3.0]]
Example 2
Input:
solve([[2], [2]], [3], [4])
Output:
[[4.0], [4.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.