Skip to main content
Log in

Mojo function

get_sliding_window_out_dim

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:

The size of the output dimension.