class_docstr: ASPP (Atrous Spatial Pyramid Pooling)
  
  This is an implementation of the ASPP module used in DetectoRS
  (https://arxiv.org/pdf/2006.02334.pdf)
  
  Args:
      in_channels (int): Number of input channels.
      out_channels (int): Number of channels produced by this module
      dilations (tuple[int]): Dilations of the four branches.
          Default: (1, 3, 6, 1)
      init_cfg (dict or list[dict], optional): Initialization config dict.
class_docstr_tok: ["ASPP","(","Atrous","Spatial","Pyramid","Pooling",")","This","is","an","implementation","of","the","ASPP","module","used","in","DetectoRS","(","https",":","\/\/arxiv.org\/pdf\/2006.02334.pdf",")","Args",":","in_channels","(","int",")",":","Number","of","input","channels",".","out_channels","(","int",")",":","Number","of","channels","produced","by","this","module","dilations","(","tuple","[","int","]",")",":","Dilations","of","the","four","branches",".","Default",":","(","1",",","3",",","6",",","1",")","init_cfg","(","dict","or","list","[","dict","]",",","optional",")",":","Initialization","config","dict","."]
code: def __init__(
      self,
      in_channels,
      out_channels,
      dilations=(1, 3, 6, 1),
      init_cfg=dict(type="Kaiming", layer="Conv2d"),
  ):
      super().__init__(init_cfg)
      assert dilations[-1] == 1
      self.aspp = nn.ModuleList()
      for dilation in dilations:
          kernel_size = 3 if dilation > 1 else 1
          padding = dilation if dilation > 1 else 0
          conv = nn.Conv2d(
              in_channels,
              out_channels,
              kernel_size=kernel_size,
              stride=1,
              dilation=dilation,
              padding=padding,
              bias=True,
          )
          self.aspp.append(conv)
      self.gap = nn.AdaptiveAvgPool2d(1)
  
file_path: mmdetection/mmdet/models/necks/rfp.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmengine.model import BaseModule, ModuleList, constant_init, xavier_init
  from mmdet.registry import MODELS
  from .fpn import FPN
label_desc: Use image node_id 1 to create a new ASPP object from inherited base classes: BaseModule with example: obj = ASPP(in_channels, out_channels, dilations, init_cfg)