class_docstr: The BiSeNet V2 implementation based on PaddlePaddle.
  
  The original article refers to
  Yu, Changqian, et al. "BiSeNet V2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation"
  (https://arxiv.org/abs/2004.02147)
  
  Args:
      num_classes (int): The unique number of target classes, default is 19.
      lambd (float, optional): A factor for controlling the size of semantic branch channels. Default: 0.25.
      align_corners (bool, optional): An argument of F.interpolate. It should be set to False when the feature size is even,
          e.g. 1024x512, otherwise it is True, e.g. 769x769. Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","BiSeNet","V2","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Yu",",","Changqian",",","et","al",".","``","BiSeNet","V2",":","Bilateral","Network","with","Guided","Aggregation","for","Real-time","Semantic","Segmentation","''","(","https",":","\/\/arxiv.org\/abs\/2004.02147",")","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",",","default","is","19.","lambd","(","float",",","optional",")",":","A","factor","for","controlling","the","size","of","semantic","branch","channels",".","Default",":","0.25.","align_corners","(","bool",",","optional",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","feature","size","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]:
      dfm = self.db(x)
      feat1, feat2, feat3, feat4, sfm = self.sb(x)
      logit = self.head(self.bga(dfm, sfm))
  
      if not self.training:
          logit_list = [logit]
      else:
          logit1 = self.aux_head1(feat1)
          logit2 = self.aux_head2(feat2)
          logit3 = self.aux_head3(feat3)
          logit4 = self.aux_head4(feat4)
          logit_list = [logit, logit1, logit2, logit3, logit4]
  
      logit_list = [
          F.interpolate(
              logit,
              paddle.shape(x)[2:],
              mode="bilinear",
              align_corners=self.align_corners,
          )
          for logit in logit_list
      ]
  
      return logit_list
  
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
  import bisenet_cityscapes.layers
label_desc: Use image node_id 3 for calling the BiSeNetV2 obj's underlying member method code with example usage: obj.forward(x) and returns: logit_list