code: def __init__(self, in_channels: int = 3, out_channels: int = 1):
      super().__init__()
  
      self.conv_in = nn.Conv2d(in_channels, 64, 3, stride=2, padding=1)
      self.pool_in = nn.MaxPool2d(2, stride=2, ceil_mode=True)
  
      self.stage1 = RSU7(64, 32, 64)
      self.pool12 = nn.MaxPool2d(2, stride=2, ceil_mode=True)
  
      self.stage2 = RSU6(64, 32, 128)
      self.pool23 = nn.MaxPool2d(2, stride=2, ceil_mode=True)
  
      self.stage3 = RSU5(128, 64, 256)
      self.pool34 = nn.MaxPool2d(2, stride=2, ceil_mode=True)
  
      self.stage4 = RSU4(256, 128, 512)
      self.pool45 = nn.MaxPool2d(2, stride=2, ceil_mode=True)
  
      self.stage5 = RSU4F(512, 256, 512)
      self.pool56 = nn.MaxPool2d(2, stride=2, ceil_mode=True)
  
      self.stage6 = RSU4F(512, 256, 512)
  
      # decoder
      self.stage5d = RSU4F(1024, 256, 512)
      self.stage4d = RSU4(1024, 128, 256)
      self.stage3d = RSU5(512, 64, 128)
      self.stage2d = RSU6(256, 32, 64)
      self.stage1d = RSU7(128, 16, 64)
  
      self.side1 = nn.Conv2d(64, out_channels, 3, padding=1)
      self.side2 = nn.Conv2d(64, out_channels, 3, padding=1)
      self.side3 = nn.Conv2d(128, out_channels, 3, padding=1)
      self.side4 = nn.Conv2d(256, out_channels, 3, padding=1)
      self.side5 = nn.Conv2d(512, out_channels, 3, padding=1)
      self.side6 = nn.Conv2d(512, out_channels, 3, padding=1)
  
imports: import torch
  import numpy
  import torch.nn
  import torch.nn.functional
  from PIL import Image
  from torch import Tensor
  from cftool.cv import to_rgb
  from torchvision.transforms.functional import normalize
  from ....misc.toolkit import download_model
label_desc: Use image node_id 1 to create a new ISNetDIS object from inherited base classes: nn with example: obj = ISNetDIS(in_channels, out_channels)