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_padding_output_shape

def get_padding_output_shape[rank: Int](input_shape: IndexList[rank], paddings: TileTensor[DType.int, Storage=paddings.Storage, address_space=paddings.address_space, linear_idx_type=paddings.linear_idx_type]) -> IndexList[rank]

Computes the output shape produced by padding input_shape with the before/after amounts given in paddings.

paddings is a flat one-dimensional tensor of length 2 * rank ordered as (before_axis0, after_axis0, before_axis1, after_axis1, ...), and the returned shape has each axis i set to before[i] + input_shape[i] + after[i].

Args:

Returns:

IndexList[rank]: The padded output shape with the same rank as input_shape.

Was this page helpful?