class_docstr: Down sampler.
  Args:
      in_channels (int): Number of input channels.
      out_channels (int): Number of output channels.
      branches (int, optional): Number of branches. Default: 9.
      kernel_size_maximum (int, optional): A maximum value of kernel_size for EESP block. Default: 9.
      shortcut (bool, optional): Use shortcut or not. Default: True.
class_docstr_tok: ["Down","sampler",".","Args",":","in_channels","(","int",")",":","Number","of","input","channels",".","out_channels","(","int",")",":","Number","of","output","channels",".","branches","(","int",",","optional",")",":","Number","of","branches",".","Default",":","9.","kernel_size_maximum","(","int",",","optional",")",":","A","maximum","value","of","kernel_size","for","EESP","block",".","Default",":","9.","shortcut","(","bool",",","optional",")",":","Use","shortcut","or","not",".","Default",":","True","."]
code: def __init__(
      self,
      in_channels,
      out_channels,
      branches=4,
      kernel_size_maximum=9,
      shortcut=True,
  ):
      super().__init__()
      if out_channels < in_channels:
          raise RuntimeError(
              "The out_channes for DownSampler should be bigger than in_channels, but got in_channles={}, out_channels={}".format(
                  in_channels, out_channels
              )
          )
      self.eesp = EESP(
          in_channels,
          out_channels - in_channels,
          stride=2,
          branches=branches,
          kernel_size_maximum=kernel_size_maximum,
          down_method="avg",
      )
      self.avg = nn.AvgPool2D(kernel_size=3, padding=1, stride=2)
      if shortcut:
          self.shortcut_layer = nn.Sequential(
              layers.ConvBNPReLU(3, 3, 3, stride=1, bias_attr=False),
              layers.ConvBN(
                  3, out_channels, 1, stride=1, bias_attr=False
              ),
          )
      self._act = nn.PReLU()
  
imports: import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg import utils
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
label_desc: Use image node_id 1 to create a new DownSampler object from inherited base classes: nn with example: obj = DownSampler(in_channels, out_channels, branches, kernel_size_maximum, shortcut)