class_docstr: A Coarse-to-Fine Segmentation Network for Small Objects in Remote Sensing Images.
  
  Args:
      num_classes (int): The unique number of target classes.
      backbone (paddle.nn.Layer): A backbone network.
      backbone_indices (tuple, optional): The values in the tuple indicate the indices of output of backbone.
         Default: (-1, ).
      kernel_sizes(tuple, optional): The sliding windows' size. Default: (128,128).
      training_stride(int, optional): The stride of sliding windows. Default: 32.
      samples_per_gpu(int, optional): The fined process's batch size. Default: 32.
      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, optional): 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","Coarse-to-Fine","Segmentation","Network","for","Small","Objects","in","Remote","Sensing","Images",".","Args",":","num_classes","(","int",")",":","The","unique","number","of","target","classes",".","backbone","(","paddle.nn.Layer",")",":","A","backbone","network",".","backbone_indices","(","tuple",",","optional",")",":","The","values","in","the","tuple","indicate","the","indices","of","output","of","backbone",".","Default",":","(","-1",",",")",".","kernel_sizes","(","tuple",",","optional",")",":","The","sliding","windows","'","size",".","Default",":","(","128,128",")",".","training_stride","(","int",",","optional",")",":","The","stride","of","sliding","windows",".","Default",":","32.","samples_per_gpu","(","int",",","optional",")",":","The","fined","process","'s","batch","size",".","Default",":","32.","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",",","optional",")",":","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,
      backbone,
      backbone_indices=(-1,),
      kernel_sizes=(128, 128),
      training_stride=32,
      samples_per_gpu=32,
      channels=None,
      align_corners=False,
      pretrained=None,
  ):
      super(C2FNet, self).__init__()
      self.backbone = backbone
      backbone_channels = [
          backbone.feat_channels[i] for i in backbone_indices
      ]
      self.head_fgbg = FCNHead(
          2, backbone_indices, backbone_channels, channels
      )
      self.num_cls = num_classes
      self.kernel_sizes = [kernel_sizes[0], kernel_sizes[1]]
      self.training_stride = training_stride
      self.samples = samples_per_gpu
      self.align_corners = align_corners
      self.pretrained = pretrained
      self.init_weight()
  
file_path: PaddleSeg/contrib/RSSegBenchmark/c2fnet/models/c2fnet.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  import paddleseg.utils.logger
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models import layers
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new C2FNet object from inherited base classes: nn with example: obj = C2FNet(num_classes, backbone, backbone_indices, kernel_sizes, training_stride, samples_per_gpu, channels, align_corners, pretrained)