Skip to main content

Mojo function

layer_norm

layer_norm[dtype: DType, rank: Int, input_0_fn: def[_width: Int, _rank: Int](IndexList[_rank]) capturing -> SIMD[dtype, _width], input_1_fn: def[_width: Int, _rank: Int](IndexList[_rank]) capturing -> SIMD[dtype, _width], output_0_fn: def[width: Int, rank: Int, alignment: Int](idx: IndexList[rank], val: SIMD[dtype, width]) capturing -> None, /, target: StringSlice[StaticConstantOrigin] = StringSlice("cpu")](shape: IndexList[rank], gamma_shape: IndexList[1], beta: TileTensor[dtype, beta.LayoutType, beta.origin, address_space=beta.address_space, linear_idx_type=beta.linear_idx_type, element_size=beta.element_size], epsilon: Scalar[dtype], ctx: DeviceContextPtr)

Was this page helpful?