Home / Class/ pooling_output_shape_pad_lr Class — pytorch Architecture

pooling_output_shape_pad_lr Class — pytorch Architecture

Architecture documentation for the pooling_output_shape_pad_lr class in Pool.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/Pool.h lines 60–75

template<typename T>
inline T pooling_output_shape_pad_lr(
        T inputSize, T kernelSize, T pad_l, T pad_r, T stride, T dilation,
        bool ceil_mode) {
    T outputSize = div_rtn<T>(
        inputSize + pad_l + pad_r - dilation * (kernelSize - 1) - 1 +
        (ceil_mode ? stride - 1 : 0), stride) + 1;
    if (ceil_mode) {
        // ensure that the last pooling starts inside the image
        // needed to avoid problems in ceil mode
        if ((outputSize - 1) * stride >= inputSize + pad_l) {
          --outputSize;
        }
    }
    return outputSize;
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free