code: def __init__(
      self,
      in_channels=512,
      n_filters=256,
      kernel_size=4,
      is_deconv=False,
      is_upsample=True,
  ):
      super().__init__()
  
      self.is_upsample = is_upsample
  
      if kernel_size == 3:
          conv_stride = 1
      elif kernel_size == 1:
          conv_stride = 1
      elif kernel_size == 4:
          conv_stride = 2
  
      # B, C, H, W -> B, C/4, H, W
      self.conv1 = nn.Conv2d(
          in_channels, in_channels // 4, 3, padding=1
      )
      self.norm1 = nn.BatchNorm2d(in_channels // 4)
      self.relu1 = nonlinearity(inplace=True)
  
      # B, C/4, H, W -> B, C/4, H, W
      if is_deconv is True:
          self.deconv2 = nn.ConvTranspose2d(
              in_channels // 4,
              in_channels // 4,
              kernel_size,
              stride=conv_stride,
              padding=1,
          )
      else:
          self.deconv2 = nn.Upsample(scale_factor=2)
  
      self.norm2 = nn.BatchNorm2d(in_channels // 4)
      self.relu2 = nonlinearity(inplace=True)
  
      # B, C/4, H, W -> B, C, H, W
      self.conv3 = nn.Conv2d(in_channels // 4, n_filters, 3, padding=1)
      self.norm3 = nn.BatchNorm2d(n_filters)
      self.relu3 = nonlinearity(inplace=True)
  
imports: from torch import nn
label_desc: Use image node_id 1 to create a new DecoderBlockLinkNetV2 object from inherited base classes: nn with example: obj = DecoderBlockLinkNetV2(in_channels, n_filters, kernel_size, is_deconv, is_upsample)