class_docstr: Median pool (usable as median filter when stride=1) module.
  
  Args:
       kernel_size: size of pooling kernel, int or 2-tuple
       stride: pool stride, int or 2-tuple
       padding: pool padding, int or 4-tuple (l, r, t, b) as in pytorch F.pad
       same: override padding and enforce same padding, boolean
code: def forward(self, x):
      x = F.pad(x, self._padding(x), mode="reflect")
      x = x.unfold(2, self.k[0], self.stride[0]).unfold(
          3, self.k[1], self.stride[1]
      )
      x = x.contiguous().view(x.size()[:4] + (-1,)).median(dim=-1)[0]
      return x
  
file_path: pytorch-image-models/timm/layers/median_pool.py
imports: import torch.nn
  import torch.nn.functional
  from .helpers import to_2tuple, to_4tuple
label_desc: Use image node_id 3 for calling the MedianPool2d obj's underlying member method code with example usage: obj.forward(x) and returns: x