class_docstr: Self-Attention Block for AFNB module.
  
  Args:
      low_in_channels (int): Low-level-feature channels.
      high_in_channels (int): High-level-feature channels.
      key_channels (int): The key channels in self-attention block.
      value_channels (int): The value channels in self-attention block.
      out_channels (int, optional): Out channels of AFNB module. Default: None.
      scale (int, optional): Pooling size. Default: 1.
      psp_size (tuple, optional): The out size of pooled feature maps. Default: (1, 3, 6, 8).
code: def forward(
      self,
      low_feats: List[paddle.Tensor],
      high_feats: List[paddle.Tensor],
  ) -> paddle.Tensor:
      batch_size, _, h, w = high_feats.shape
  
      value = self.f_value(low_feats)
      value = _pp_module(value, self.psp_size)
      value = paddle.transpose(value, (0, 2, 1))
  
      query = self.f_query(high_feats)
      query = paddle.reshape(query, shape=(0, self.key_channels, -1))
      query = paddle.transpose(query, perm=(0, 2, 1))
  
      key = self.f_key(low_feats)
      key = _pp_module(key, self.psp_size)
  
      sim_map = paddle.matmul(query, key)
      sim_map = (self.key_channels**-0.5) * sim_map
      sim_map = F.softmax(sim_map, axis=-1)
  
      context = paddle.matmul(sim_map, value)
      context = paddle.transpose(context, perm=(0, 2, 1))
      hf_shape = paddle.shape(high_feats)
      context = paddle.reshape(
          context,
          shape=[0, self.value_channels, hf_shape[2], hf_shape[3]],
      )
  
      context = self.W(context)
  
      return context
  
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_cityscapes.resnet import ResNet50_vd
  import ann_resnet50_cityscapes.layers
label_desc: Use image node_id 2 for calling the SelfAttentionBlock_AFNB obj's underlying member method code with example usage: obj.forward(low_feats, high_feats) and returns: context