code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      multi_scale_output: bool = True,
      name: str = None,
      align_corners: bool = False,
  ):
      super(FuseLayers, self).__init__()
  
      self._actual_ch = len(in_channels) if multi_scale_output else 1
      self._in_channels = in_channels
      self.align_corners = align_corners
  
      self.residual_func_list = []
      for i in range(self._actual_ch):
          for j in range(len(in_channels)):
              if j > i:
                  residual_func = self.add_sublayer(
                      "residual_{}_layer_{}_{}".format(
                          name, i + 1, j + 1
                      ),
                      layers.ConvBN(
                          in_channels=in_channels[j],
                          out_channels=out_channels[i],
                          kernel_size=1,
                          padding="same",
                          bias_attr=False,
                      ),
                  )
                  self.residual_func_list.append(residual_func)
              elif j < i:
                  pre_num_filters = in_channels[j]
                  for k in range(i - j):
                      if k == i - j - 1:
                          residual_func = self.add_sublayer(
                              "residual_{}_layer_{}_{}_{}".format(
                                  name, i + 1, j + 1, k + 1
                              ),
                              layers.ConvBN(
                                  in_channels=pre_num_filters,
                                  out_channels=out_channels[i],
                                  kernel_size=3,
                                  stride=2,
                                  padding="same",
                                  bias_attr=False,
                              ),
                          )
                          pre_num_filters = out_channels[i]
                      else:
                          residual_func = self.add_sublayer(
                              "residual_{}_layer_{}_{}_{}".format(
                                  name, i + 1, j + 1, k + 1
                              ),
                              layers.ConvBNReLU(
                                  in_channels=pre_num_filters,
                                  out_channels=out_channels[j],
                                  kernel_size=3,
                                  stride=2,
                                  padding="same",
                                  bias_attr=False,
                              ),
                          )
                          pre_num_filters = out_channels[j]
                      self.residual_func_list.append(residual_func)
  
imports: import math
  from typing import List
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import fcn_hrnetw48_cityscapes.layers
label_desc: Use image node_id 1 to create a new FuseLayers object from inherited base classes: nn with example: obj = FuseLayers(in_channels, out_channels, multi_scale_output, name, align_corners)