code: def _init_upsample(
      self, in_channels, out_channels, smooth=False, bias=False
  ):
      if smooth:
          inter_out_channels = out_channels
          if out_channels == 1:
              inter_out_channels = in_channels
          module_list = [
              nn.Upsample(scale_factor=2, mode="nearest"),
              nn.Conv2D(
                  in_channels,
                  inter_out_channels,
                  3,
                  1,
                  1,
                  bias_attr=bias,
                  weight_attr=ParamAttr(
                      initializer=nn.initializer.KaimingNormal()
                  ),
              ),
          ]
          if out_channels == 1:
              module_list.append(
                  nn.Conv2D(
                      in_channels,
                      out_channels,
                      kernel_size=1,
                      stride=1,
                      padding=1,
                      bias_attr=True,
                      weight_attr=ParamAttr(
                          initializer=nn.initializer.KaimingNormal()
                      ),
                  )
              )
          return nn.Sequential(module_list)
      else:
          return nn.Conv2DTranspose(
              in_channels,
              out_channels,
              2,
              2,
              weight_attr=ParamAttr(
                  initializer=nn.initializer.KaimingNormal()
              ),
          )
  
file_path: PaddleOCR/benchmark/PaddleOCR_DBNet/models/head/DBHead.py
imports: import paddle
  from paddle import nn, ParamAttr
label_desc: Use image node_id 4 for calling the DBHead obj's underlying member method code with example usage: obj._init_upsample(in_channels, out_channels, smooth, bias) and returns: nn, nn