class_docstr: Full Resolution Residual Networks for Semantic Segmentation
  URL: https://arxiv.org/abs/1611.08323
  
  References:
  1) Original Author's code: https://github.com/TobyPDE/FRRN
  2) TF implementation by @kiwonjoon: https://github.com/hiwonjoon/tf-frrn
class_docstr_tok: ["Full","Resolution","Residual","Networks","for","Semantic","Segmentation","URL",":","https",":","\/\/arxiv.org\/abs\/1611.08323","References",":","1",")","Original","Author","'s","code",":","https",":","\/\/github.com\/TobyPDE\/FRRN","2",")","TF","implementation","by","@","kiwonjoon",":","https",":","\/\/github.com\/hiwonjoon\/tf-frrn"]
code: def __init__(self, num_classes=21, model_type=None, **kwargs):
      super(frrn, self).__init__()
      self.n_classes = num_classes
      self.model_type = model_type
      self.K = 64 * 512
  
      self.conv1 = conv2DBatchNormRelu(3, 48, 5, 1, 2)
  
      self.up_residual_units = []
      self.down_residual_units = []
      for i in range(3):
          self.up_residual_units.append(
              RU(channels=48, kernel_size=3, strides=1)
          )
          self.down_residual_units.append(
              RU(channels=48, kernel_size=3, strides=1)
          )
  
      self.up_residual_units = nn.ModuleList(self.up_residual_units)
      self.down_residual_units = nn.ModuleList(self.down_residual_units)
  
      self.split_conv = nn.Conv2d(
          48, 32, kernel_size=1, padding=0, stride=1, bias=True
      )
  
      # each spec is as (n_blocks, channels, scale)
      self.encoder_frru_specs = frrn_specs_dic[self.model_type][
          "encoder"
      ]
  
      self.decoder_frru_specs = frrn_specs_dic[self.model_type][
          "decoder"
      ]
  
      # encoding
      prev_channels = 48
      self.encoding_frrus = {}
      for n_blocks, channels, scale in self.encoder_frru_specs:
          for block in range(n_blocks):
              key = "_".join(
                  map(
                      str,
                      [
                          "encoding_frru",
                          n_blocks,
                          channels,
                          scale,
                          block,
                      ],
                  )
              )
              setattr(
                  self,
                  key,
                  FRRU(
                      prev_channels=prev_channels,
                      out_channels=channels,
                      scale=scale,
                  ),
              )
          prev_channels = channels
  
      # decoding
      self.decoding_frrus = {}
      for n_blocks, channels, scale in self.decoder_frru_specs:
          # pass through decoding FRRUs
          for block in range(n_blocks):
              key = "_".join(
                  map(
                      str,
                      [
                          "decoding_frru",
                          n_blocks,
                          channels,
                          scale,
                          block,
                      ],
                  )
              )
              setattr(
                  self,
                  key,
                  FRRU(
                      prev_channels=prev_channels,
                      out_channels=channels,
                      scale=scale,
                  ),
              )
          prev_channels = channels
  
      self.merge_conv = nn.Conv2d(
          prev_channels + 32,
          48,
          kernel_size=1,
          padding=0,
          stride=1,
          bias=True,
      )
  
      self.classif_conv = nn.Conv2d(
          48,
          self.n_classes,
          kernel_size=1,
          padding=0,
          stride=1,
          bias=True,
      )
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new frrn object from inherited base classes: nn with example: obj = frrn(num_classes, model_type)