This repo implements the Layer Normalization with different programming languages or libraries: Tensorflow (Keras), Numpy, C++, Eigen, CUDA. Each sample includes both the forward and backward passes and results are checked compared with Keras's LayerNormalization layer.
Suppose are batch and feature dimensions respectively.
Here we can view as a composition function
, where
and
,
are defined as above. Therefore, we get: