Mojo function
layer_norm_shape
layer_norm_shape[dtype: DType](input: TileTensor[dtype, input.LayoutType, input.origin, address_space=input.address_space, linear_idx_type=input.linear_idx_type, element_size=input.element_size], gamma: TileTensor[dtype, gamma.LayoutType, gamma.origin, address_space=gamma.address_space, linear_idx_type=gamma.linear_idx_type, element_size=gamma.element_size], 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]) -> 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): The input tensor. - gamma (
TileTensor): The tensor for gamma coefficient. - beta (
TileTensor): The tensor for beta coefficient. - epsilon (
Scalar): The tensor for epsilon coefficient.
Returns:
IndexList: The output shape.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!