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 forward(self, inputs):
      imsize = paddle.shape(inputs)[2:]
      feats = self.backbone(inputs)
      if self.use_jpu:
          feats = self.jpu_layer(*feats)
  
      fcn_feat = feats[2]
  
      feat = self.bottleneck(feats[-1])
      if self.add_lateral:
          laterals = []
          for i, lateral_conv in enumerate(self.lateral_convs):
              laterals.append(
                  F.interpolate(
                      lateral_conv(feats[i]),
                      size=paddle.shape(feat)[2:],
                      mode="bilinear",
                      align_corners=False,
                  )
              )
          feat = self.fusion(paddle.concat([feat, *laterals], 1))
      encode_feat, feat = self.enc_module(feat)
      out = self.cls_seg(feat)
      out = F.interpolate(
          out, size=imsize, mode="bilinear", align_corners=False
      )
      output = [out]
  
      if self.training:
          fcn_out = self.fcn_head(fcn_feat)
          fcn_out = F.interpolate(
              fcn_out, size=imsize, mode="bilinear", align_corners=False
          )
          output.append(fcn_out)
          if self.use_se_loss:
              se_out = self.se_layer(encode_feat)
              output.append(se_out)
          return output
      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 FastFCN obj's underlying member method code with example usage: obj.forward(inputs) and returns: output, output