class_docstr: Asymmetric Pyramid Non-local Block.
  
  Args:
      in_channels (int): The input channels of APNB module.
      out_channels (int): Out channels of APNB module.
      key_channels (int): The key channels in self-attention block.
      value_channels (int): The value channels in self-attention block.
      dropout_prob (float): The dropout rate of output.
      repeat_sizes (tuple, optional): The number of AFNB modules. Default: ([1]).
      psp_size (tuple, optional): The out size of pooled feature maps. Default: (1, 3, 6, 8).
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      key_channels: int,
      value_channels: int,
      dropout_prob: float,
      repeat_sizes: Tuple[int] = ([1]),
      psp_size: Tuple[int] = (1, 3, 6, 8),
  ):
      super().__init__()
  
      self.psp_size = psp_size
      self.stages = nn.LayerList(
          [
              SelfAttentionBlock_APNB(
                  in_channels,
                  out_channels,
                  key_channels,
                  value_channels,
                  size,
              )
              for size in repeat_sizes
          ]
      )
      self.conv_bn = layers.ConvBNReLU(
          in_channels=in_channels * 2,
          out_channels=out_channels,
          kernel_size=1,
      )
      self.dropout = nn.Dropout(p=dropout_prob)
  
imports: import os
  from typing import Union, List, Tuple
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddlehub.module.module import moduleinfo
  import paddlehub.vision.segmentation_transforms
  from paddlehub.module.cv_module import ImageSegmentationModule
  from ann_resnet50_voc.resnet import ResNet50_vd
  import ann_resnet50_voc.layers
label_desc: Use image node_id 1 to create a new APNB object from inherited base classes: nn with example: obj = APNB(in_channels, out_channels, key_channels, value_channels, dropout_prob, repeat_sizes, psp_size)