class_docstr: The LPSNet implementation based on PaddlePaddle.
  
  The original article refers to
  Zhang, Yiheng and Yao, Ting and Qiu, Zhaofan and Mei, Tao. "Lightweight and Progressively-Scalable Networks for Semantic Segmentation"
  (https://arxiv.org/pdf/2207.13600)
  
  Args:
      depths (list): Depths of each block.
      channels (list): Channels of each block.
      scale_ratios (list): Scale ratio for each branch. The number of branches depends on length of scale_ratios.
      num_classes (int): The unique number of target classes.
      in_channels (int):  The channels of input image. Default: 3.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","LPSNet","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Zhang",",","Yiheng","and","Yao",",","Ting","and","Qiu",",","Zhaofan","and","Mei",",","Tao",".","``","Lightweight","and","Progressively-Scalable","Networks","for","Semantic","Segmentation","''","(","https",":","\/\/arxiv.org\/pdf\/2207.13600",")","Args",":","depths","(","list",")",":","Depths","of","each","block",".","channels","(","list",")",":","Channels","of","each","block",".","scale_ratios","(","list",")",":","Scale","ratio","for","each","branch",".","The","number","of","branches","depends","on","length","of","scale_ratios",".","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","in_channels","(","int",")",":","The","channels","of","input","image",".","Default",":","3.","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def forward(self, x, interact_begin_idx=2):
      input_size = paddle.shape(x)[-2:]
      inputs = self._preprocess_input(x)
      feats = []
      for path, x in zip(self.nets, inputs):
          inp = x
          for idx in range(interact_begin_idx + 1):
              inp = path[idx](inp)
          feats.append(inp)
  
      for idx in range(interact_begin_idx + 1, self.num_blocks):
          feats = _multipath_interaction(feats)
          feats = [path[idx](x) for path, x in zip(self.nets, feats)]
  
      size = paddle.shape(feats[0])[-2:]
      feats = [_interpolate(x, size=size) for x in feats]
  
      out = self.head(paddle.concat(feats, 1))
  
      return [_interpolate(out, size=input_size)]
  
file_path: PaddleSeg/paddleseg/models/lpsnet.py
imports: from functools import partial
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import manager
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 5 for calling the LPSNet obj's underlying member method code with example usage: obj.forward(x, interact_begin_idx) and returns: list