Mojo function
avg_pool_cpu
avg_pool_cpu[dtype: DType, int_type: DType, rank: Int = 4, count_boundary: Bool = False](input: TileTensor[dtype, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], filter: TileTensor[int_type, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], strides: TileTensor[int_type, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], dilations: TileTensor[int_type, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], paddings: TileTensor[int_type, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], output: TileTensor[dtype, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], ceil_mode: Bool = False)
Computes the average pool.
Params: count_boundary: Whether to count the boundary in the average computation.
Args:
- input (
TileTensor): Batched image input to the pool2d operator. - filter (
TileTensor): Filter size on height and width dimensions with assumed tuple def (filter_h, filter_w). - strides (
TileTensor): Strides on height and width dimensions with assumed tuple def (stride_h, stride_w). - dilations (
TileTensor): Dilations on height and width dimensions with assumed tuple def (dilation_h, dilation_w). - paddings (
TileTensor): Paddings on height and width dimensions with assumed tuple def (pad_h_before, pad_h_after, pad_w_before, pad_w_after)). - output (
TileTensor): Pre-allocated output tensor space. - ceil_mode (
Bool): Ceiling mode defines the output shape and implicit padding.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!