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_sliding_window_out_dim

def get_sliding_window_out_dim[ceil_mode: Bool = False](in_dim: Int, ft_dim: Int, dilation: Int, stride: Int, pad: Int) -> Int

Return output dimension for a sliding window operation along some dimension.

Parameters:

  • ​ceil_mode (Bool): Define rounding mode for shape calculation.

Args:

  • ​in_dim (Int): The size of the input dimension.
  • ​ft_dim (Int): The size of the corresponding filter dimension.
  • ​dilation (Int): The dilation for the sliding window operation.
  • ​stride (Int): The stride for the sliding window operation.
  • ​pad (Int): The total padding for the sliding window operation.

Returns:

Int: The size of the output dimension.