class_docstr: Context Aggregation Network
class_docstr_tok: ["Context","Aggregation","Network"]
code: def __init__(
      self, input_spec: FeatureMapsSpecification, out_channels=256
  ):
      super().__init__(input_spec)
      features = input_spec.channels
  
      self.encoder_rcm = nn.ModuleList(
          RCM(in_channels, out_channels) for in_channels in features
      )
      self.cfm = nn.Sequential(
          CFM(out_channels, out_channels),
          RCM(out_channels * 5, out_channels),
      )
  
      self.amm_blocks = nn.ModuleList(
          AMM(out_channels, out_channels)
          for in_channels in features[:-1]
      )
      self.rcm_blocks = nn.ModuleList(
          RCM(out_channels, out_channels)
          for in_channels in features[:-1]
      )
  
      self.output_spec = FeatureMapsSpecification(
          channels=[out_channels] * len(input_spec),
          strides=input_spec.strides,
      )
  
imports: from typing import List
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
  from ..dsconv import DepthwiseSeparableConv2d
  from ..interfaces import AbstractDecoder, FeatureMapsSpecification
label_desc: Use image node_id 1 to create a new CANDecoder object from inherited base classes: AbstractDecoder with example: obj = CANDecoder(input_spec, out_channels)