LayerNormΒΆ

Applies Layer Normalization.

Abstract Signature:

LayerNorm(input: Tensor, normalized_shape: List[int], weight: Tensor, bias: Tensor, eps: float = 1e-05)

PyTorch

API: torch.nn.functional.layer_norm
Strategy: Direct Mapping

JAX (Core)

API: β€”
Strategy: Custom / Partial

NumPy

API: β€”
Strategy: Custom / Partial

Keras

API: keras.layers.LayerNormalization
Strategy: Macro 'keras.layers.LayerNormalization(epsilon={eps})({input})'

TensorFlow

API: tf.keras.layers.LayerNormalization
Strategy: Macro 'tf.keras.layers.LayerNormalization(epsilon={eps})({input})'

Apple MLX

API: mlx.nn.layers.normalization.LayerNorm
Strategy: Macro 'mx.fast.layer_norm({input}, {weight}, {bias}, {eps})'

Flax NNX

API: nnx.nn.normalization.LayerNorm
Strategy: Macro 'nnx.LayerNorm(num_features={normalized_shape}, epsilon={eps}).call({input})'

PaxML / Praxis

API: β€”
Strategy: Custom / Partial