calculate_pool_output_size

Function calculate_pool_output_size 

pub fn calculate_pool_output_size(
    kernel_size: usize,
    stride: usize,
    padding: usize,
    dilation: usize,
    size_in: usize,
    ceil_mode: bool,
) -> usize
Expand description

Calculate the expected output size when doing a pooling operation.

ยงArguments

  • kernel_size - Size of the pooling kernel
  • stride - Stride of the pooling operation
  • padding - Padding applied to input
  • dilation - Dilation of the pooling kernel
  • size_in - Input size (height or width)
  • ceil_mode - If true, use ceiling instead of floor for output size calculation. This allows the last pooling window to go out-of-bounds if needed.