code: def __init__(
      self, in_channels, middle_channels, out_channels, is_deconv=True
  ):
      super(DecoderBlockV2, self).__init__()
      self.in_channels = in_channels
  
      if is_deconv:
          """
          Paramaters for Deconvolution were chosen to avoid artifacts, following
          link https://distill.pub/2016/deconv-checkerboard/
          """
  
          self.block = nn.Sequential(
              ConvRelu(in_channels, middle_channels),
              nn.ConvTranspose2d(
                  middle_channels,
                  out_channels,
                  kernel_size=4,
                  stride=2,
                  padding=1,
              ),
              nn.ReLU(inplace=True),
          )
      else:
          self.block = nn.Sequential(
              nn.Upsample(scale_factor=2, mode="bilinear"),
              ConvRelu(in_channels, middle_channels),
              ConvRelu(middle_channels, out_channels),
          )
  
imports: from torch import nn
label_desc: Use image node_id 1 to create a new DecoderBlockV2 object from inherited base classes: nn with example: obj = DecoderBlockV2(in_channels, middle_channels, out_channels, is_deconv)