class_docstr: The FastFCN implementation based on PaddlePaddle.
  
  The original article refers to
  Huikai Wu, Junge Zhang, Kaiqi Huang. "FastFCN: Rethinking Dilated Convolution in the Backbone for Semantic Segmentation".
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (Paddle.nn.Layer): A backbone network.
      backbone_indices (tuple): The values in the tuple indicate the indices of
          output of backbone.
      num_codes (int): The number of encoded words. Default: 32.
      mid_channels (int): The channels of middle layers. Default: 512.
      use_jpu (bool): Whether use jpu module. Default: True.
      aux_loss (bool): Whether use auxiliary head loss. Default: True.
      use_se_loss (int): Whether use semantic encoding loss. Default: True.
      add_lateral (int): Whether use lateral convolution layers. Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None.
class_docstr_tok: ["The","FastFCN","implementation","based","on","PaddlePaddle",".","The","original","article","refers","to","Huikai","Wu",",","Junge","Zhang",",","Kaiqi","Huang",".","``","FastFCN",":","Rethinking","Dilated","Convolution","in","the","Backbone","for","Semantic","Segmentation","''",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","Paddle.nn.Layer",")",":","A","backbone","network",".","backbone_indices","(","tuple",")",":","The","values","in","the","tuple","indicate","the","indices","of","output","of","backbone",".","num_codes","(","int",")",":","The","number","of","encoded","words",".","Default",":","32.","mid_channels","(","int",")",":","The","channels","of","middle","layers",".","Default",":","512.","use_jpu","(","bool",")",":","Whether","use","jpu","module",".","Default",":","True",".","aux_loss","(","bool",")",":","Whether","use","auxiliary","head","loss",".","Default",":","True",".","use_se_loss","(","int",")",":","Whether","use","semantic","encoding","loss",".","Default",":","True",".","add_lateral","(","int",")",":","Whether","use","lateral","convolution","layers",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None","."]
code: def __init__(
      self,
      num_classes,
      backbone,
      num_codes=32,
      mid_channels=512,
      use_jpu=True,
      aux_loss=True,
      use_se_loss=True,
      add_lateral=False,
      pretrained=None,
  ):
      super().__init__()
      self.add_lateral = add_lateral
      self.num_codes = num_codes
      self.backbone = backbone
      self.use_jpu = use_jpu
      in_channels = self.backbone.feat_channels
  
      if use_jpu:
          self.jpu_layer = layers.JPU(in_channels, mid_channels)
          in_channels[-1] = mid_channels * 4
          self.bottleneck = layers.ConvBNReLU(
              in_channels[-1],
              mid_channels,
              1,
              padding=0,
              bias_attr=False,
          )
      else:
          self.bottleneck = layers.ConvBNReLU(
              in_channels[-1],
              mid_channels,
              3,
              padding=1,
              bias_attr=False,
          )
      if self.add_lateral:
          self.lateral_convs = nn.LayerList(
              [
                  layers.ConvBNReLU(
                      in_channels[0], mid_channels, 1, bias_attr=False
                  ),
                  layers.ConvBNReLU(
                      in_channels[1], mid_channels, 1, bias_attr=False
                  ),
              ]
          )
  
          self.fusion = layers.ConvBNReLU(
              3 * mid_channels,
              mid_channels,
              3,
              padding=1,
              bias_attr=False,
          )
  
      self.enc_module = EncModule(mid_channels, num_codes)
      self.cls_seg = nn.Conv2D(mid_channels, num_classes, 1)
  
      self.aux_loss = aux_loss
      if self.aux_loss:
          self.fcn_head = layers.AuxLayer(
              in_channels[-2], mid_channels, num_classes
          )
  
      self.use_se_loss = use_se_loss
      if use_se_loss:
          self.se_layer = nn.Linear(mid_channels, num_classes)
  
      self.pretrained = pretrained
      self.init_weight()
  
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 1 to create a new FastFCN object from inherited base classes: nn with example: obj = FastFCN(num_classes, backbone, num_codes, mid_channels, use_jpu, aux_loss, use_se_loss, add_lateral, pretrained)