class_docstr: 2D FCN network with 3 input channels. The small decoder is built
  with the GCN and Refine modules.
  The code is adapted from `lsqshr's official 2D code <https://github.com/lsqshr/AH-Net/blob/master/net2d.py>`_.
  
  Args:
      out_channels: number of output channels. Defaults to 1.
      upsample_mode: [``"transpose"``, ``"bilinear"``]
          The mode of upsampling manipulations.
          Using the second mode cannot guarantee the model's reproducibility. Defaults to ``bilinear``.
  
          - ``transpose``, uses transposed convolution layers.
          - ``bilinear``, uses bilinear interpolation.
  
      pretrained: If True, returns a model pre-trained on ImageNet
      progress: If True, displays a progress bar of the download to stderr.
class_docstr_tok: ["2D","FCN","network","with","3","input","channels",".","The","small","decoder","is","built","with","the","GCN","and","Refine","modules",".","The","code","is","adapted","from","`","lsqshr","'s","official","2D","code","<","https",":","\/\/github.com\/lsqshr\/AH-Net\/blob\/master\/net2d.py",">","`","_",".","Args",":","out_channels",":","number","of","output","channels",".","Defaults","to","1.","upsample_mode",":","[","``","``","transpose","''","``",",","``","``","bilinear","''","``","]","The","mode","of","upsampling","manipulations",".","Using","the","second","mode","can","not","guarantee","the","model","'s","reproducibility",".","Defaults","to","``","bilinear","``",".","-","``","transpose","``",",","uses","transposed","convolution","layers",".","-","``","bilinear","``",",","uses","bilinear","interpolation",".","pretrained",":","If","True",",","returns","a","model","pre-trained","on","ImageNet","progress",":","If","True",",","displays","a","progress","bar","of","the","download","to","stderr","."]
code: def __init__(
      self,
      out_channels: int = 1,
      upsample_mode: str = "bilinear",
      pretrained: bool = True,
      progress: bool = True,
  ):
      super().__init__()
  
      conv2d_type: type[nn.Conv2d] = Conv[Conv.CONV, 2]
  
      self.upsample_mode = upsample_mode
      self.conv2d_type = conv2d_type
      self.out_channels = out_channels
      resnet = models.resnet50(pretrained=pretrained, progress=progress)
  
      self.conv1 = resnet.conv1
      self.bn0 = resnet.bn1
      self.relu = resnet.relu
      self.maxpool = resnet.maxpool
  
      self.layer1 = resnet.layer1
      self.layer2 = resnet.layer2
      self.layer3 = resnet.layer3
      self.layer4 = resnet.layer4
  
      self.gcn1 = GCN(2048, self.out_channels)
      self.gcn2 = GCN(1024, self.out_channels)
      self.gcn3 = GCN(512, self.out_channels)
      self.gcn4 = GCN(64, self.out_channels)
      self.gcn5 = GCN(64, self.out_channels)
  
      self.refine1 = Refine(self.out_channels)
      self.refine2 = Refine(self.out_channels)
      self.refine3 = Refine(self.out_channels)
      self.refine4 = Refine(self.out_channels)
      self.refine5 = Refine(self.out_channels)
      self.refine6 = Refine(self.out_channels)
      self.refine7 = Refine(self.out_channels)
      self.refine8 = Refine(self.out_channels)
      self.refine9 = Refine(self.out_channels)
      self.refine10 = Refine(self.out_channels)
      self.transformer = self.conv2d_type(
          in_channels=256, out_channels=64, kernel_size=1
      )
  
      if self.upsample_mode == "transpose":
          self.up_conv = UpSample(
              spatial_dims=2,
              in_channels=self.out_channels,
              scale_factor=2,
              mode="deconv",
          )
  
imports: from __future__ import annotations
  import torch
  import torch.nn
  import torch.nn.functional
  from monai.networks.blocks.convolutions import Convolution
  from monai.networks.blocks.upsample import UpSample
  from monai.networks.layers.factories import Act, Conv, Norm
  from monai.utils import optional_import
label_desc: Use image node_id 1 to create a new FCN object from inherited base classes: nn with example: obj = FCN(out_channels, upsample_mode, pretrained, progress)