Implement the layer normalization forward pass.
Signature: def layer_norm(x: np.ndarray, gamma: np.ndarray, beta: np.ndarray, eps: float = 1e-5) -> np.ndarray
Normalize across the feature dimension (last axis) for each sample independently.
Math
Asked at
Test Results