class_docstr: The STDCNet 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:
      base(int, optional): base channels. Default: 64.
      layers(list, optional): layers numbers list. It determines STDC block numbers of STDCNet's stage3. Defualt: [4, 5, 3].
      block_num(int,optional): block_num of features block. Default: 4.
      type(str,optional): feature fusion method "cat"/"add". Default: "cat".
      num_classes(int, optional): class number for image classification. Default: 1000.
      dropout(float,optional): dropout ratio. if >0,use dropout ratio.  Default: 0.20.
      use_conv_last(bool,optional): whether to use the last ConvBNReLU layer . Default: False.
      pretrained(str, optional): the path of pretrained model.
class_docstr_tok: ["The","STDCNet","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",":","base","(","int",",","optional",")",":","base","channels",".","Default",":","64.","layers","(","list",",","optional",")",":","layers","numbers","list",".","It","determines","STDC","block","numbers","of","STDCNet","'s","stage3\u0004\u0005",".","Defualt",":","[","4",",","5",",","3","]",".","block_num","(","int",",","optional",")",":","block_num","of","features","block",".","Default",":","4.","type","(","str",",","optional",")",":","feature","fusion","method","``","cat","''","\/","''","add","''",".","Default",":","``","cat","''",".","num_classes","(","int",",","optional",")",":","class","number","for","image","classification",".","Default",":","1000.","dropout","(","float",",","optional",")",":","dropout","ratio",".","if",">","0",",","use","dropout","ratio",".","Default",":","0.20.","use_conv_last","(","bool",",","optional",")",":","whether","to","use","the","last","ConvBNReLU","layer",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","the","path","of","pretrained","model","."]
code: def __init__(
      self,
      base: int = 64,
      layers: List[int] = [4, 5, 3],
      block_num: int = 4,
      type: str = "cat",
      num_classes: int = 1000,
      dropout: float = 0.20,
      use_conv_last: bool = False,
  ):
      super(STDCNet, self).__init__()
      if type == "cat":
          block = CatBottleneck
      elif type == "add":
          block = AddBottleneck
      self.use_conv_last = use_conv_last
      self.features = self._make_layers(base, layers, block_num, block)
      self.conv_last = ConvBNRelu(base * 16, max(1024, base * 16), 1, 1)
  
      if layers == [4, 5, 3]:  # stdc1446
          self.x2 = nn.Sequential(self.features[:1])
          self.x4 = nn.Sequential(self.features[1:2])
          self.x8 = nn.Sequential(self.features[2:6])
          self.x16 = nn.Sequential(self.features[6:11])
          self.x32 = nn.Sequential(self.features[11:])
      elif layers == [2, 2, 2]:  # stdc813
          self.x2 = nn.Sequential(self.features[:1])
          self.x4 = nn.Sequential(self.features[1:2])
          self.x8 = nn.Sequential(self.features[2:4])
          self.x16 = nn.Sequential(self.features[4:6])
          self.x32 = nn.Sequential(self.features[6:])
      else:
          raise NotImplementedError(
              "model with layers:{} is not implemented!".format(layers)
          )
  
imports: from typing import Union, List, Tuple
  import math
  import paddle
  import paddle.nn
  import stdc1_seg_cityscapes.layers
label_desc: Use image node_id 1 to create a new STDCNet object from inherited base classes: nn with example: obj = STDCNet(base, layers, block_num, type, num_classes, dropout, use_conv_last)