Skip to main content

Mojo function

layer_norm

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

Was this page helpful?