class_docstr: Compute blur (anti-aliasing) and downsample a given feature map.
  
  See :cite:`zhang2019shiftinvar` for more details.
  
  Args:
      kernel_size: the kernel size for max pooling.
      stride: stride for pooling.
  
  Shape:
      - Input: :math:`(B, C, H, W)`
      - Output: :math:`(N, C, H_{out}, W_{out})`, where
  
        .. math::
            H_{out} = \left\lfloor\frac{H_{in}  + 2 \times \text{kernel\_size//2}[0] -
              \text{kernel\_size}[0]}{\text{stride}[0]} + 1\right\rfloor
  
        .. math::
            W_{out} = \left\lfloor\frac{W_{in}  + 2 \times \text{kernel\_size//2}[1] -
              \text{kernel\_size}[1]}{\text{stride}[1]} + 1\right\rfloor
  
  Examples:
      >>> from kornia.filters.blur_pool import BlurPool2D
      >>> input = torch.eye(5)[None, None]
      >>> bp = BlurPool2D(kernel_size=3, stride=2)
      >>> bp(input)
      tensor([[[[0.3125, 0.0625, 0.0000],
                [0.0625, 0.3750, 0.0625],
                [0.0000, 0.0625, 0.3125]]]])
code: def __init__(
      self, kernel_size: tuple[int, int] | int, stride: int = 2
  ) -> None:
      super().__init__()
      self.kernel_size = kernel_size
      self.stride = stride
      self.kernel = get_pascal_kernel_2d(kernel_size, norm=True)
  
imports: from __future__ import annotations
  import torch.nn.functional
  from kornia.core import Module, Tensor, as_tensor, pad, tensor
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_SHAPE
  from .kernels import get_pascal_kernel_2d
  from .median import _compute_zero_padding
label_desc: Use image node_id 1 to create a new BlurPool2D object from inherited base classes: Module with example: obj = BlurPool2D(kernel_size, stride)