class_docstr: A self-attention module.
code: def __init__(self, in_channels: int, key_channels: int):
      super().__init__()
  
      self.in_channels = in_channels
      self.key_channels = key_channels
  
      self.f_pixel = nn.Sequential(
          L.ConvBNReLU(in_channels, key_channels, 1),
          L.ConvBNReLU(key_channels, key_channels, 1),
      )
  
      self.f_object = nn.Sequential(
          L.ConvBNReLU(in_channels, key_channels, 1),
          L.ConvBNReLU(key_channels, key_channels, 1),
      )
  
      self.f_down = L.ConvBNReLU(in_channels, key_channels, 1)
  
      self.f_up = L.ConvBNReLU(key_channels, in_channels, 1)
  
imports: import os
  from typing import List
  import paddle
  import numpy
  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
  import ocrnet_hrnetw18_cityscapes.layers
  from ocrnet_hrnetw18_cityscapes.hrnet import HRNet_W18
label_desc: Use image node_id 1 to create a new ObjectAttentionBlock object from inherited base classes: nn with example: obj = ObjectAttentionBlock(in_channels, key_channels)