IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

pool_shape

def pool_shape[input_type: DType, filter_type: DType, strides_type: DType, dilations_type: DType, paddings_type: DType](input_buf: TileTensor[input_type, Storage=input_buf.Storage, address_space=input_buf.address_space, linear_idx_type=input_buf.linear_idx_type], filter_buf: TileTensor[filter_type, Storage=filter_buf.Storage, address_space=filter_buf.address_space, linear_idx_type=filter_buf.linear_idx_type], strides_buf: TileTensor[strides_type, Storage=strides_buf.Storage, address_space=strides_buf.address_space, linear_idx_type=strides_buf.linear_idx_type], dilations_buf: TileTensor[dilations_type, Storage=dilations_buf.Storage, address_space=dilations_buf.address_space, linear_idx_type=dilations_buf.linear_idx_type], paddings_buf: TileTensor[paddings_type, Storage=paddings_buf.Storage, address_space=paddings_buf.address_space, linear_idx_type=paddings_buf.linear_idx_type]) -> IndexList[input_buf.LayoutType.rank]

Computes the output shape of a pooling operation using floor rounding for the spatial dimensions.

Parameters:

  • ​input_type (DType): Data type of the input tensor.
  • ​filter_type (DType): Data type of the filter tensor.
  • ​strides_type (DType): Data type of the strides tensor.
  • ​dilations_type (DType): Data type of the dilations tensor.
  • ​paddings_type (DType): Data type of the paddings tensor.

Args:

Returns:

IndexList[input_buf.LayoutType.rank]: The output shape with floor-mode rounding applied.

Was this page helpful?