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.
      lambd (float, optional): A factor for controlling the size of semantic branch channels. Default: 0.25.
      in_channels (int, optional): The channels of input image. Default: 3.
      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",".","lambd","(","float",",","optional",")",":","A","factor","for","controlling","the","size","of","semantic","branch","channels",".","Default",":","0.25.","in_channels","(","int",",","optional",")",":","The","channels","of","input","image",".","Default",":","3.","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def __init__(
      self,
      num_classes,
      lambd=0.25,
      align_corners=False,
      in_channels=3,
      pretrained=None,
  ):
      super().__init__()
  
      C1, C2, C3 = 64, 64, 128
      db_channels = (C1, C2, C3)
      C1, C3, C4, C5 = int(C1 * lambd), int(C3 * lambd), 64, 128
      sb_channels = (C1, C3, C4, C5)
      mid_channels = 128
  
      self.db = DetailBranch(in_channels, db_channels)
      self.sb = SemanticBranch(in_channels, sb_channels)
  
      self.bga = BGA(mid_channels, align_corners)
      self.aux_head1 = SegHead(C1, C1, num_classes)
      self.aux_head2 = SegHead(C3, C3, num_classes)
      self.aux_head3 = SegHead(C4, C4, num_classes)
      self.aux_head4 = SegHead(C5, C5, num_classes)
      self.head = SegHead(mid_channels, mid_channels, num_classes)
  
      self.align_corners = align_corners
      self.pretrained = pretrained
      self.init_weight()
  
imports: import os
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg import utils
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
label_desc: Use image node_id 1 to create a new BiSeNetV2 object from inherited base classes: nn with example: obj = BiSeNetV2(num_classes, lambd, align_corners, in_channels, pretrained)