Mojo function
group_norm_reshape
group_norm_reshape[dtype: DType, rank: Int](shape: IndexList[rank, element_type=element_type], buf: TileTensor[dtype, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], channels_per_group: Int, spatial: Int) -> TileTensor[dtype, Layout[RuntimeInt[DType.int64], RuntimeInt[DType.int64], RuntimeInt[DType.int64], RuntimeInt[DType.int64]], origin, address_space=address_space]
Reshapes an input buffer for group normalization by flattening all dimensions except the group dimension. Returns a 2D buffer of shape (num_groups * N, group_size), where group_size is the product of channels_per_group and spatial.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!