class_docstr: The STDCSeg implementation based on PaddlePaddle.
  
  The original article refers to Meituan
  Fan, Mingyuan, et al. "Rethinking BiSeNet For Real-time Semantic Segmentation."
  (https://arxiv.org/abs/2104.13188)
  
  Args:
      num_classes(int,optional): The unique number of target classes.
      use_boundary_8(bool,non-optional): Whether to use detail loss. it should be True accroding to paper for best metric. Default: True.
      Actually,if you want to use _boundary_2/_boundary_4/_boundary_16,you should append loss function number of DetailAggregateLoss.It should work properly.
      use_conv_last(bool,optional): Determine ContextPath 's inplanes variable according to whether to use bockbone's last conv. Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","STDCSeg","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Meituan","Fan",",","Mingyuan",",","et","al",".","``","Rethinking","BiSeNet","For","Real-time","Semantic","Segmentation",".","''","(","https",":","\/\/arxiv.org\/abs\/2104.13188",")","Args",":","num_classes","(","int",",","optional",")",":","The","unique","number","of","target","classes",".","use_boundary_8","(","bool",",","non-optional",")",":","Whether","to","use","detail","loss",".","it","should","be","True","accroding","to","paper","for","best","metric",".","Default",":","True",".","Actually",",","if","you","want","to","use","_boundary_2\/_boundary_4\/_boundary_16",",","you","should","append","loss","function","number","of","DetailAggregateLoss.It","should","work","properly",".","use_conv_last","(","bool",",","optional",")",":","Determine","ContextPath","'s","inplanes","variable","according","to","whether","to","use","bockbone","'s","last","conv",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def forward(self, x: paddle.Tensor) -> List[paddle.Tensor]:
      x_hw = paddle.shape(x)[2:]
      feat_res2, feat_res4, feat_res8, _, feat_cp8, feat_cp16 = self.cp(
          x
      )
  
      logit_list = []
      if self.training:
          feat_fuse = self.ffm(feat_res8, feat_cp8)
          feat_out = self.conv_out(feat_fuse)
          feat_out8 = self.conv_out8(feat_cp8)
          feat_out16 = self.conv_out16(feat_cp16)
  
          logit_list = [feat_out, feat_out8, feat_out16]
          logit_list = [
              F.interpolate(
                  x, x_hw, mode="bilinear", align_corners=True
              )
              for x in logit_list
          ]
  
          if self.use_boundary_2:
              feat_out_sp2 = self.conv_out_sp2(feat_res2)
              logit_list.append(feat_out_sp2)
          if self.use_boundary_4:
              feat_out_sp4 = self.conv_out_sp4(feat_res4)
              logit_list.append(feat_out_sp4)
          if self.use_boundary_8:
              feat_out_sp8 = self.conv_out_sp8(feat_res8)
              logit_list.append(feat_out_sp8)
      else:
          feat_fuse = self.ffm(feat_res8, feat_cp8)
          feat_out = self.conv_out(feat_fuse)
          feat_out = F.interpolate(
              feat_out, x_hw, mode="bilinear", align_corners=True
          )
          logit_list = [feat_out]
  
      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
  from stdc1_seg_voc.stdcnet import STDC1
  import stdc1_seg_voc.layers
label_desc: Use image node_id 3 for calling the STDCSeg obj's underlying member method code with example usage: obj.forward(x) and returns: logit_list