Skip to main content
Log in

Mojo function

layer_norm

layer_norm[dtype: DType](input: Symbol, gamma: Symbol, beta: Symbol, epsilon: SIMD[dtype, 1]) -> Symbol

Performs layer normalization.

Args:

  • ​input (Symbol): The input tensor to normalize.
  • ​gamma (Symbol): The gamma parameter of the normalization.
  • ​beta (Symbol): The beta parameter of the normalization.
  • ​epsilon (SIMD[dtype, 1]): The epsilon parameter of the normalization.

Returns:

A symbolic tensor value with the normalization applied.

Was this page helpful?