code: def __init__(
      self,
      layers=[3, 4, 4, 2],
      norm_layer=None,
      large_kernel=False,
      late_downsample=False,
  ):
      super().__init__()
  
      if norm_layer is None:
          norm_layer = nn.BatchNorm
      self._norm_layer = norm_layer
      self.large_kernel = large_kernel
      self.kernel_size = 5 if self.large_kernel else 3
  
      self.inplanes = 512 if layers[0] > 0 else 256
      self.late_downsample = late_downsample
      self.midplanes = 64 if late_downsample else 32
  
      self.conv1 = nn.utils.spectral_norm(
          nn.Conv2DTranspose(
              self.midplanes,
              32,
              kernel_size=4,
              stride=2,
              padding=1,
              bias_attr=False,
          )
      )
      self.bn1 = norm_layer(32)
      self.leaky_relu = nn.LeakyReLU(0.2)
      self.conv2 = nn.Conv2D(
          32,
          1,
          kernel_size=self.kernel_size,
          stride=1,
          padding=self.kernel_size // 2,
      )
      self.upsample = nn.UpsamplingNearest2D(scale_factor=2)
      self.tanh = nn.Tanh()
      self.layer1 = self._make_layer(
          BasicBlock, 256, layers[0], stride=2
      )
      self.layer2 = self._make_layer(
          BasicBlock, 128, layers[1], stride=2
      )
      self.layer3 = self._make_layer(
          BasicBlock, 64, layers[2], stride=2
      )
      self.layer4 = self._make_layer(
          BasicBlock, self.midplanes, layers[3], stride=2
      )
  
      self.init_weight()
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.models import layers
  from paddleseg import utils
  from paddleseg.cvlibs import manager, param_init
  from ppmatting.models.layers import GuidedCxtAtten
label_desc: Use image node_id 1 to create a new ResNet_D_Dec object from inherited base classes: nn with example: obj = ResNet_D_Dec(layers, norm_layer, large_kernel, late_downsample)