Apply layer normalisation to a 2-D batch X: for each row compute the mean and population variance across its features, 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, 3], [2, 6]], [1, 2], [0, 1], eps=0)
Output:
[[-1.0, 3.0], [-1.0, 3.0]]
Example 2
Input:
solve([[2, 2]], [3, 4], [1, -1])
Output:
[[1.0, -1.0]]
No results yet
Run your code to check it against the examples, or submit to run every test.