For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
max_pool_shape
def max_pool_shape[dtype: DType, int_type: DType](input: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input.static_spec], filter: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=filter.static_spec], strides: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=strides.static_spec], dilations: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=dilations.static_spec], paddings: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=paddings.static_spec]) -> IndexList[Int(4)]
Computes the output shape for the mo.max_pool graph op.
Parameters:
- dtype (
DType): Element type of the poolinginputtensor. - int_type (
DType): Element type of thefilter,strides,dilations, andpaddingstensors.
Args:
- input (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input.static_spec]): Rank-4 batched image input to the pooling operator. - filter (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=filter.static_spec]): One-dimensional tensor of filter sizes on the height and width dimensions,(filter_h, filter_w). - strides (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=strides.static_spec]): One-dimensional tensor of strides on the height and width dimensions,(stride_h, stride_w). - dilations (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=dilations.static_spec]): One-dimensional tensor of dilations on the height and width dimensions,(dilation_h, dilation_w). - paddings (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=paddings.static_spec]): One-dimensional tensor of paddings on the height and width dimensions,(pad_h_before, pad_h_after, pad_w_before, pad_w_after).
Returns:
IndexList[Int(4)]: The output shape of the max pooling operation.