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 forward(self, x, inputs=None):
      avg_out = self.avg(x)
      eesp_out = self.eesp(x)
      output = paddle.concat([avg_out, eesp_out], axis=1)
  
      if inputs is not None:
          w1 = paddle.shape(avg_out)[2]
          w2 = paddle.shape(inputs)[2]
  
          inputs = paddle.reshape(
              inputs,
              [
                  inputs.shape[0],
                  inputs.shape[1],
                  paddle.shape(inputs)[2],
                  paddle.shape(inputs)[3],
              ],
          )
          if hasattr(paddle.framework, "_no_check_dy2st_diff"):
              # TODO(wanghuancoder): _no_check_dy2st_diff is used to turn off the checking of behavior
              # inconsistency between dynamic graph and static graph. _no_check_dy2st_diff should be
              # removed after static graphs support inplace and stride.
              with paddle.framework._no_check_dy2st_diff():
                  while w2 != w1:
                      inputs = F.avg_pool2d(
                          inputs, kernel_size=3, padding=1, stride=2
                      )
                      w2 = paddle.shape(inputs)[2]
          else:
              while w2 != w1:
                  inputs = F.avg_pool2d(
                      inputs, kernel_size=3, padding=1, stride=2
                  )
                  w2 = paddle.shape(inputs)[2]
  
          output = output + self.shortcut_layer(inputs)
      return self._act(output)
  
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 2 for calling the DownSampler obj's underlying member method code with example usage: obj.forward(x, inputs) and returns: self