Skip to main content

Python class

ConstantLayerNorm

ConstantLayerNorm

class max.nn.ConstantLayerNorm(dims, device, dtype, eps=1e-05)

source

Bases: Module

Layer normalization block with constant gamma and beta values.

When called, ConstantLayerNorm accepts a TensorValue and returns a normalized TensorValue of the same shape.

Parameters:

beta

beta: npt.NDArray[np.floating[Any]]

source

device

device: DeviceRef

source

dtype

dtype: DType

source

eps

eps: float = 1e-05

source

gamma

gamma: npt.NDArray[np.floating[Any]]

source