class_docstr: A simple implementation for FCN based on PaddlePaddle.
  
  The original article refers to
  Evan Shelhamer, et, al. "Fully Convolutional Networks for Semantic Segmentation"
  (https://arxiv.org/abs/1411.4038).
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone_indices (tuple, optional): The values in the tuple indicate the indices of output of backbone.
          Default: (-1, ).
      channels (int, optional): The channels between conv layer and the last layer of FCNHead.
          If None, it will be the number of channels of input features. Default: None.
      align_corners (bool): An argument of F.interpolate. It should be set to False when the output size of feature
          is even, e.g. 1024x512, otherwise it is True, e.g. 769x769.  Default: False.
      pretrained (str, optional): The path or url of pretrained model. Default: None
class_docstr_tok: ["A","simple","implementation","for","FCN","based","on","PaddlePaddle",".","The","original","article","refers","to","Evan","Shelhamer",",","et",",","al",".","``","Fully","Convolutional","Networks","for","Semantic","Segmentation","''","(","https",":","\/\/arxiv.org\/abs\/1411.4038",")",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone_indices","(","tuple",",","optional",")",":","The","values","in","the","tuple","indicate","the","indices","of","output","of","backbone",".","Default",":","(","-1",",",")",".","channels","(","int",",","optional",")",":","The","channels","between","conv","layer","and","the","last","layer","of","FCNHead",".","If","None",",","it","will","be","the","number","of","channels","of","input","features",".","Default",":","None",".","align_corners","(","bool",")",":","An","argument","of","F.interpolate",".","It","should","be","set","to","False","when","the","output","size","of","feature","is","even",",","e.g",".","1024x512",",","otherwise","it","is","True",",","e.g",".","769x769",".","Default",":","False",".","pretrained","(","str",",","optional",")",":","The","path","or","url","of","pretrained","model",".","Default",":","None"]
code: def __init__(
      self,
      num_classes: int = 19,
      backbone_indices: Tuple[int] = (-1,),
      channels: int = None,
      align_corners: bool = False,
      pretrained: str = None,
  ):
      super(FCN, self).__init__()
  
      self.backbone = HRNet_W18()
      backbone_channels = [
          self.backbone.feat_channels[i] for i in backbone_indices
      ]
  
      self.head = FCNHead(
          num_classes, backbone_indices, backbone_channels, channels
      )
  
      self.align_corners = align_corners
      self.transforms = T.Compose([T.Normalize()])
  
      if pretrained is not None:
          model_dict = paddle.load(pretrained)
          self.set_dict(model_dict)
          print("load custom parameters success")
  
      else:
          checkpoint = os.path.join(self.directory, "model.pdparams")
          model_dict = paddle.load(checkpoint)
          self.set_dict(model_dict)
          print("load pretrained parameters success")
  
file_path: PaddleHub/modules/image/semantic_segmentation/fcn_hrnetw18_cityscapes/module.py
imports: import os
  from typing import Union, List, Tuple
  import paddle
  from paddle import nn
  import paddle.nn.functional
  import numpy
  from paddlehub.module.module import moduleinfo
  import paddlehub.vision.segmentation_transforms
  from paddlehub.module.cv_module import ImageSegmentationModule
  from fcn_hrnetw18_cityscapes.hrnet import HRNet_W18
  import fcn_hrnetw18_cityscapes.layers
label_desc: Use image node_id 1 to create a new FCN object from inherited base classes: nn with example: obj = FCN(num_classes, backbone_indices, channels, align_corners, pretrained)