Mojo function
layer_norm_shape
layer_norm_shape[dtype: DType](input: TileTensor[dtype, address_space=input.address_space, linear_idx_type=input.linear_idx_type, element_size=input.element_size], gamma: TileTensor[dtype, address_space=gamma.address_space, linear_idx_type=gamma.linear_idx_type, element_size=gamma.element_size], beta: TileTensor[dtype, address_space=beta.address_space, linear_idx_type=beta.linear_idx_type, element_size=beta.element_size], epsilon: Scalar[dtype]) -> IndexList[TileTensor[dtype, input.LayoutType, input.origin, address_space=input.address_space, linear_idx_type=input.linear_idx_type, element_size=input.element_size].rank]
Compute the output shape of a layer_norm operation.
Parameters:
- βdtype (
DType): Type of the input tensors.
Args:
- βinput (
TileTensor[dtype, address_space=input.address_space, linear_idx_type=input.linear_idx_type, element_size=input.element_size]): The input tensor. - βgamma (
TileTensor[dtype, address_space=gamma.address_space, linear_idx_type=gamma.linear_idx_type, element_size=gamma.element_size]): The tensor for gamma coefficient. - βbeta (
TileTensor[dtype, address_space=beta.address_space, linear_idx_type=beta.linear_idx_type, element_size=beta.element_size]): The tensor for beta coefficient. - βepsilon (
Scalar[dtype]): The tensor for epsilon coefficient.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!