class_docstr: The Attention-UNet implementation based on PaddlePaddle.
  As mentioned in the original paper, author proposes a novel attention gate (AG)
  that automatically learns to focus on target structures of varying shapes and sizes.
  Models trained with AGs implicitly learn to suppress irrelevant regions in an input image while
  highlighting salient features useful for a specific task.
  
  The original article refers to
  Oktay, O, et, al. "Attention u-net: Learning where to look for the pancreas."
  (https://arxiv.org/pdf/1804.03999.pdf).
  
  Args:
      num_classes (int): The unique number of target classes.
      in_channels (int, optional): The channels of input image. Default: 3.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","Attention-UNet","implementation","based","on","PaddlePaddle",".","As","mentioned","in","the","original","paper",",","author","proposes","a","novel","attention","gate","(","AG",")","that","automatically","learns","to","focus","on","target","structures","of","varying","shapes","and","sizes",".","Models","trained","with","AGs","implicitly","learn","to","suppress","irrelevant","regions","in","an","input","image","while","highlighting","salient","features","useful","for","a","specific","task",".","The","original","article","refers","to","Oktay",",","O",",","et",",","al",".","``","Attention","u-net",":","Learning","where","to","look","for","the","pancreas",".","''","(","https",":","\/\/arxiv.org\/pdf\/1804.03999.pdf",")",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","in_channels","(","int",",","optional",")",":","The","channels","of","input","image",".","Default",":","3.","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def __init__(self, num_classes, in_channels=3, pretrained=None):
      super().__init__()
      self.encoder = Encoder(in_channels, [64, 128, 256, 512])
      filters = np.array([64, 128, 256, 512, 1024])
      self.up5 = UpConv(ch_in=filters[4], ch_out=filters[3])
      self.att5 = AttentionBlock(
          F_g=filters[3], F_l=filters[3], F_out=filters[2]
      )
      self.up_conv5 = ConvBlock(ch_in=filters[4], ch_out=filters[3])
  
      self.up4 = UpConv(ch_in=filters[3], ch_out=filters[2])
      self.att4 = AttentionBlock(
          F_g=filters[2], F_l=filters[2], F_out=filters[1]
      )
      self.up_conv4 = ConvBlock(ch_in=filters[3], ch_out=filters[2])
  
      self.up3 = UpConv(ch_in=filters[2], ch_out=filters[1])
      self.att3 = AttentionBlock(
          F_g=filters[1], F_l=filters[1], F_out=filters[0]
      )
      self.up_conv3 = ConvBlock(ch_in=filters[2], ch_out=filters[1])
  
      self.up2 = UpConv(ch_in=filters[1], ch_out=filters[0])
      self.att2 = AttentionBlock(
          F_g=filters[0], F_l=filters[0], F_out=filters[0] // 2
      )
      self.up_conv2 = ConvBlock(ch_in=filters[1], ch_out=filters[0])
  
      self.conv_1x1 = nn.Conv2D(
          filters[0], num_classes, kernel_size=1, stride=1, padding=0
      )
      self.pretrained = pretrained
      self.init_weight()
  
imports: import paddle
  import paddle.nn
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg import utils
  import numpy
label_desc: Use image node_id 1 to create a new AttentionUNet object from inherited base classes: nn with example: obj = AttentionUNet(num_classes, in_channels, pretrained)