class_docstr: General self-attention block/non-local block.
  
  Args:
       in_channels (int): Input channels of key/query feature.
       channels (int): Output channels of key/query transform.
class_docstr_tok: ["General","self-attention","block\/non-local","block",".","Args",":","in_channels","(","int",")",":","Input","channels","of","key\/query","feature",".","channels","(","int",")",":","Output","channels","of","key\/query","transform","."]
code: def forward(self, x: paddle.Tensor) -> paddle.Tensor:
      context = super(SelfAttentionBlock, self).forward(x, x)
      return self.output_project(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 isanet_resnet50_cityscapes.resnet import ResNet50_vd
  import isanet_resnet50_cityscapes.layers
label_desc: Use image node_id 2 for calling the SelfAttentionBlock obj's underlying member method code with example usage: obj.forward(x) and returns: self