code: def __init__(self, num_classes, **kwargs):
      super(UNetRes, self).__init__()
  
      # Assuming Input as 240x320x3
      self.enc1 = nn.Sequential(
          nn.Conv2d(3, 64, 3, padding=1),
          nn.ReLU(inplace=True),
          nn.Conv2d(64, 64, 3, padding=1),
          nn.ReLU(inplace=True),
      )
      self.pool1 = nn.Conv2d(
          64, 128, kernel_size=2, stride=2
      )  # Conv as Pool
      self.enc2 = Conv2dX2_Res(128, 128, 3, padding=1)
      self.pool2 = nn.Conv2d(
          128, 256, kernel_size=2, stride=2
      )  # Conv as Pool
      self.enc3 = Conv2dX2_Res(256, 256, 3, padding=1)
      self.pool3 = nn.Conv2d(
          256, 512, kernel_size=2, stride=2
      )  # Conv as Pool
      self.enc4 = Conv2dX2_Res(512, 512, 3, padding=1)
      self.pool4 = nn.Conv2d(
          512, 1024, kernel_size=2, stride=2
      )  # Conv as Pool
  
      self.middle = nn.Sequential(
          Conv2dX2_Res(1024, 1024, 3, padding=1),
          nn.ConvTranspose2d(1024, 512, kernel_size=2, stride=2),
          nn.ReLU(inplace=True),
      )
  
      self.pass_enc4 = PassConv(512, 512)
      self.pass_enc3 = PassConv(256, 256)
      self.pass_enc2 = PassConv(128, 128)
      self.pass_enc1 = PassConv(64, 64)
  
      self.dec1 = DeconvX2_Res(512, 256, 2, stride=2)
      self.dec2 = DeconvX2_Res(256, 128, 2, stride=2)
      self.dec3 = DeconvX2_Res(128, 64, 2, stride=2)
  
      self.dec4 = nn.Sequential(
          nn.Conv2d(64, 64, 3, padding=1),
          nn.Conv2d(64, num_classes, kernel_size=1, stride=1),
      )
  
      self.activation = nn.Sigmoid()
  
      initialize_weights(self)
  
imports: import torch
  import torch.nn
  import torch.nn.init
  import torch.nn.functional
  import numpy
label_desc: Use image node_id 1 to create a new UNetRes object from inherited base classes: nn with example: obj = UNetRes(num_classes)