class_docstr: The UNet3+ implementation based on PaddlePaddle.
  
  The original article refers to
  Huang H , Lin L , Tong R , et al. "UNet 3+: A Full-Scale Connected UNet for Medical Image Segmentation"
  (https://arxiv.org/abs/2004.08790).
  
  Args:
      in_channels (int, optional): The channel number of input image.  Default: 3.
      num_classes (int, optional): The unique number of target classes.  Default: 2.
      is_batchnorm (bool, optional): Use batchnorm after conv or not.  Default: True.
      is_deepsup (bool, optional): Use deep supervision or not.  Default: False.
      is_CGM (bool, optional): Use classification-guided module or not.
          If True, is_deepsup must be True.  Default: False.
class_docstr_tok: ["The","UNet3+","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Huang","H",",","Lin","L",",","Tong","R",",","et","al",".","``","UNet","3+",":","A","Full-Scale","Connected","UNet","for","Medical","Image","Segmentation","''","(","https",":","\/\/arxiv.org\/abs\/2004.08790",")",".","Args",":","in_channels","(","int",",","optional",")",":","The","channel","number","of","input","image",".","Default",":","3.","num_classes","(","int",",","optional",")",":","The","unique","number","of","target","classes",".","Default",":","2.","is_batchnorm","(","bool",",","optional",")",":","Use","batchnorm","after","conv","or","not",".","Default",":","True",".","is_deepsup","(","bool",",","optional",")",":","Use","deep","supervision","or","not",".","Default",":","False",".","is_CGM","(","bool",",","optional",")",":","Use","classification-guided","module","or","not",".","If","True",",","is_deepsup","must","be","True",".","Default",":","False","."]
code: def __init__(
      self,
      in_channels=3,
      num_classes=2,
      is_batchnorm=True,
      is_deepsup=False,
      is_CGM=False,
  ):
      super(UNet3Plus, self).__init__()
      # parameters
      self.is_deepsup = True if is_CGM else is_deepsup
      self.is_CGM = is_CGM
      # internal definition
      self.filters = [64, 128, 256, 512, 1024]
      self.cat_channels = self.filters[0]
      self.cat_blocks = 5
      self.up_channels = self.cat_channels * self.cat_blocks
      # layers
      self.encoder = Encoder(in_channels, self.filters, is_batchnorm)
      self.decoder = Decoder(
          self.filters, self.cat_channels, self.up_channels
      )
      if self.is_deepsup:
          self.deepsup = DeepSup(
              self.up_channels, self.filters, num_classes
          )
          if self.is_CGM:
              self.cls = nn.Sequential(
                  nn.Dropout(p=0.5),
                  nn.Conv2D(self.filters[4], 2, 1),
                  nn.AdaptiveMaxPool2D(1),
                  nn.Sigmoid(),
              )
      else:
          self.outconv1 = nn.Conv2D(
              self.up_channels, num_classes, 3, padding=1
          )
      # initialise weights
      for sublayer in self.sublayers():
          if isinstance(sublayer, nn.Conv2D):
              kaiming_normal_init(sublayer.weight)
          elif isinstance(sublayer, (nn.BatchNorm, nn.SyncBatchNorm)):
              kaiming_normal_init(sublayer.weight)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models.layers.layer_libs import SyncBatchNorm
  from paddleseg.cvlibs.param_init import kaiming_normal_init
label_desc: Use image node_id 1 to create a new UNet3Plus object from inherited base classes: nn with example: obj = UNet3Plus(in_channels, num_classes, is_batchnorm, is_deepsup, is_CGM)