class_docstr: Aggregation layer to compute the pixel-region representation.
code: def forward(
      self, pixels: paddle.Tensor, regions: paddle.Tensor
  ) -> paddle.Tensor:
      n, c, h, w = pixels.shape
      _, k, _, _ = regions.shape
  
      # pixels: from (n, c, h, w) to (n, h*w, c)
      pixels = paddle.reshape(pixels, (n, c, h * w))
      pixels = paddle.transpose(pixels, [0, 2, 1])
  
      # regions: from (n, k, h, w) to (n, k, h*w)
      regions = paddle.reshape(regions, (n, k, h * w))
      regions = F.softmax(regions, axis=2)
  
      # feats: from (n, k, c) to (n, c, k, 1)
      feats = paddle.bmm(regions, pixels)
      feats = paddle.transpose(feats, [0, 2, 1])
      feats = paddle.unsqueeze(feats, axis=-1)
  
      return feats
  
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 for calling the SpatialGatherBlock obj's underlying member method code with example usage: obj.forward(pixels, regions) and returns: feats