For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
layer_norm
def layer_norm[dtype: DType, rank: Int, input_0_fn: def[_width: Int, _rank: Int, alignment: Int](IndexList[_rank]) capturing -> SIMD[dtype, _width], input_1_fn: def[_width: Int, _rank: Int, alignment: Int](IndexList[_rank]) capturing -> SIMD[dtype, _width], output_0_fn: def[width: SIMDSize, rank: Int, alignment: Int](idx: IndexList[rank], val: SIMD[dtype, width]) capturing -> None, /, target: StringSlice[StaticConstantOrigin] = StringSlice("cpu")](shape: IndexList[rank], gamma_shape: IndexList[Int(1)], beta: TileTensor[dtype, Storage=beta.Storage, address_space=beta.address_space, linear_idx_type=beta.linear_idx_type, element_size=beta.element_size], epsilon: Scalar[dtype], ctx: DeviceContext)
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!