class_docstr: Atrous Spatial Pyramid Pooling.
  Args:
      aspp_ratios (tuple): The dilation rate using in ASSP module.
      in_channels (int): The number of input channels.
      out_channels (int): The number of output channels.
      align_corners (bool): An argument of F.interpolate. It should be set to False when the output size of feature
          is even, e.g. 1024x512, otherwise it is True, e.g. 769x769.
      use_sep_conv (bool, optional): If using separable conv in ASPP module. Default: False.
      image_pooling (bool, optional): If augmented with image-level features. Default: False
class_docstr_tok: ["Atrous","Spatial","Pyramid","Pooling",".","Args",":","aspp_ratios","(","tuple",")",":","The","dilation","rate","using","in","ASSP","module",".","in_channels","(","int",")",":","The","number","of","input","channels",".","out_channels","(","int",")",":","The","number","of","output","channels",".","align_corners","(","bool",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","output","size","of","feature","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","use_sep_conv","(","bool",",","optional",")",":","If","using","separable","conv","in","ASPP","module",".","Default",":","False",".","image_pooling","(","bool",",","optional",")",":","If","augmented","with","image-level","features",".","Default",":","False"]
code: def __init__(
      self,
      aspp_ratios: tuple,
      in_channels: int,
      out_channels: int,
      align_corners: bool,
      use_sep_conv: bool = False,
      image_pooling: bool = False,
  ):
      super().__init__()
  
      self.align_corners = align_corners
      self.aspp_blocks = nn.LayerList()
  
      for ratio in aspp_ratios:
          if use_sep_conv and ratio > 1:
              conv_func = SeparableConvBNReLU
          else:
              conv_func = ConvBNReLU
  
          block = conv_func(
              in_channels=in_channels,
              out_channels=out_channels,
              kernel_size=1 if ratio == 1 else 3,
              dilation=ratio,
              padding=0 if ratio == 1 else ratio,
          )
          self.aspp_blocks.append(block)
  
      out_size = len(self.aspp_blocks)
  
      if image_pooling:
          self.global_avg_pool = nn.Sequential(
              nn.AdaptiveAvgPool2D(output_size=(1, 1)),
              ConvBNReLU(
                  in_channels,
                  out_channels,
                  kernel_size=1,
                  bias_attr=False,
              ),
          )
          out_size += 1
      self.image_pooling = image_pooling
  
      self.conv_bn_relu = ConvBNReLU(
          in_channels=out_channels * out_size,
          out_channels=out_channels,
          kernel_size=1,
      )
  
      self.dropout = nn.Dropout(p=0.1)
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.layer import activation
  from paddle.nn import Conv2D, AvgPool2D
label_desc: Use image node_id 1 to create a new ASPPModule object from inherited base classes: nn with example: obj = ASPPModule(aspp_ratios, in_channels, out_channels, align_corners, use_sep_conv, image_pooling)