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 forward(self, input: Tensor) -> Tensor:
      self.kernel = as_tensor(
          self.kernel, device=input.device, dtype=input.dtype
      )
      return _blur_pool_by_kernel2d(
          input,
          self.kernel.repeat((input.shape[1], 1, 1, 1)),
          self.stride,
      )
  
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 2 for calling the BlurPool2D obj's underlying member method code with example usage: obj.forward(input) and returns: _blur_pool_by_kernel2d