Skip to main content
Log in

Python module

layer_norm

Layer Normalization layer.

LayerNorm

class max.nn.norm.layer_norm.LayerNorm(dims: int, device: DeviceRef, eps: float = 1e-05, use_bias=True)

Layer normalization block.

LayerNormV1

class max.nn.norm.layer_norm.LayerNormV1(weight: TensorValue, bias: TensorValue | None = None, eps: float = 1e-06)

Layer normalization block.

Deprecated: Use LayerNorm instead.

bias

bias*: TensorValue | None* = None

eps

eps*: float* = 1e-06

weight

weight*: TensorValue*