class_docstr: The base implementation of 2d matrix decomposition.
  
  The original article refers to
  Yuanduo Hong, Huihui Pan, Weichao Sun, et al. "Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes"
  (https://arxiv.org/abs/2101.06085)
class_docstr_tok: ["The","base","implementation","of","2d","matrix","decomposition",".","The","original","article","refers","to","Yuanduo","Hong",",","Huihui","Pan",",","Weichao","Sun",",","et","al",".","``","Deep","Dual-resolution","Networks","for","Real-time","and","Accurate","Semantic","Segmentation","of","Road","Scenes","''","(","https",":","\/\/arxiv.org\/abs\/2101.06085",")"]
code: def local_inference(self, x, bases):
      # (B * S, D, N)^T @ (B * S, D, R) -> (B * S, N, R)
      coef = paddle.bmm(x.transpose([0, 2, 1]), bases)
      coef = F.softmax(self.inv_t * coef, axis=-1)
  
      steps = self.train_steps if self.training else self.eval_steps
      for _ in range(steps):
          bases, coef = self.local_step(x, bases, coef)
  
      return bases, coef
  
file_path: PaddleSeg/paddleseg/models/layers/nmf_2d.py
imports: from abc import abstractmethod, ABCMeta
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 5 for calling the _MatrixDecomposition2DBase obj's underlying member method code with example usage: obj.local_inference(x, bases) and returns: bases,  coef