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

get_conv_shape

def get_conv_shape[rank: Int, filter_packed: Bool](output: TileTensor[Storage=output.Storage, address_space=output.address_space, linear_idx_type=output.linear_idx_type], input: TileTensor[Storage=input.Storage, address_space=input.address_space, linear_idx_type=input.linear_idx_type], filter: TileTensor[Storage=filter.Storage, address_space=filter.address_space, linear_idx_type=filter.linear_idx_type], stride: IndexList[rank], dilation: IndexList[rank], pad_d: IndexList[Int(2)], pad_h: IndexList[Int(2)], pad_w: IndexList[Int(2)], num_groups: Int) -> ConvShape[rank]

Builds a ConvShape from the output, input, and filter tile tensors.

Parameters:

  • ​rank (Int): Spatial rank of the convolution (1, 2, or 3).
  • ​filter_packed (Bool): Whether the filter tensor stores spatial dimensions starting at index 1 (packed) rather than index 0.

Args:

Returns:

ConvShape[rank]: A populated ConvShape describing the convolution dimensions.

Was this page helpful?