class_docstr: The BiSeNetV1 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://paperswithcode.com/paper/bisenet-bilateral-segmentation-network-for)
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (paddle.nn.Layer): Backbone network, currently support Resnet18_vd/Resnet34_vd/Resnet50_vd/Resnet101_vd.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","BiSeNetV1","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",":","\/\/paperswithcode.com\/paper\/bisenet-bilateral-segmentation-network-for",")","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","paddle.nn.Layer",")",":","Backbone","network",",","currently","support","Resnet18_vd\/Resnet34_vd\/Resnet50_vd\/Resnet101_vd",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def forward(self, x):
      spatial_out = self.spatial_path(x)
      context_blocks = self.backbone(x)
      context_blocks.reverse()
  
      global_context = self.global_context(context_blocks[0])
      global_context = F.interpolate(
          global_context,
          size=paddle.shape(context_blocks[0])[2:],
          mode="bilinear",
          align_corners=True,
      )
      last_fm = global_context
      pred_out = []
  
      for i, (fm, arm, refine) in enumerate(
          zip(context_blocks[:2], self.arms, self.refines)
      ):
          fm = arm(fm)
          fm += last_fm
          last_fm = F.interpolate(
              fm,
              size=paddle.shape(context_blocks[i + 1])[2:],
              mode="bilinear",
              align_corners=True,
          )
          last_fm = refine(last_fm)
          pred_out.append(last_fm)
      context_out = last_fm
  
      concate_fm = self.ffm(spatial_out, context_out)
      pred_out.append(concate_fm)
  
      output = []
      if self.training:
          for i, head in enumerate(self.heads):
              out = head(pred_out[i])
              output.append(out)
      else:
          out = self.heads[-1](pred_out[-1])
          output.append(out)
      return output
  
imports: 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 3 for calling the BiseNetV1 obj's underlying member method code with example usage: obj.forward(x) and returns: output