class_docstr: The U^2-Net implementation based on PaddlePaddle.
  
  The original article refers to
  Xuebin Qin, et, al. "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection"
  (https://arxiv.org/abs/2005.09007).
  
  Args:
      num_classes (int): The unique number of target classes.
      in_channels (int, optional): Input channels. Default: 3.
      pretrained (str, optional): The path or url of pretrained model for fine tuning. Default: None.
code: def __init__(self, num_classes, in_channels=3, pretrained=None):
      super(U2Net, self).__init__()
  
      self.stage1 = RSU7(in_channels, 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, num_classes, 3, padding=1)
      self.side2 = nn.Conv2D(64, num_classes, 3, padding=1)
      self.side3 = nn.Conv2D(128, num_classes, 3, padding=1)
      self.side4 = nn.Conv2D(256, num_classes, 3, padding=1)
      self.side5 = nn.Conv2D(512, num_classes, 3, padding=1)
      self.side6 = nn.Conv2D(512, num_classes, 3, padding=1)
  
      self.outconv = nn.Conv2D(6 * num_classes, num_classes, 1)
  
      self.pretrained = pretrained
      self.init_weight()
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new U2Net object from inherited base classes: nn with example: obj = U2Net(num_classes, in_channels, pretrained)