class_docstr: Args:
      in_channels (list): number of input feature channels from backbone.
          [16, 32, 64, 128, 256, 512] by default, means the channels of DLA-34
      down_ratio (int): the down ratio from images to heatmap, 4 by default
      last_level (int): the last level of input feature fed into the upsamplng block
      out_channel (int): the channel of the output feature, 0 by default means
          the channel of the input feature whose down ratio is `down_ratio`
      first_level (None): the first level of input feature fed into the upsamplng block.
          if None, the first level stands for logs(down_ratio)
      dcn_v2 (bool): whether use the DCNv2, True by default
      with_sge (bool): whether use SGE attention, False by default
class_docstr_tok: ["Args",":","in_channels","(","list",")",":","number","of","input","feature","channels","from","backbone",".","[","16",",","32",",","64",",","128",",","256",",","512","]","by","default",",","means","the","channels","of","DLA-34","down_ratio","(","int",")",":","the","down","ratio","from","images","to","heatmap",",","4","by","default","last_level","(","int",")",":","the","last","level","of","input","feature","fed","into","the","upsamplng","block","out_channel","(","int",")",":","the","channel","of","the","output","feature",",","0","by","default","means","the","channel","of","the","input","feature","whose","down","ratio","is","`","down_ratio","`","first_level","(","None",")",":","the","first","level","of","input","feature","fed","into","the","upsamplng","block",".","if","None",",","the","first","level","stands","for","logs","(","down_ratio",")","dcn_v2","(","bool",")",":","whether","use","the","DCNv2",",","True","by","default","with_sge","(","bool",")",":","whether","use","SGE","attention",",","False","by","default"]
code: def __init__(
      self,
      in_channels,
      down_ratio=4,
      last_level=5,
      out_channel=0,
      first_level=None,
      dcn_v2=True,
      with_sge=False,
  ):
      super(CenterNetDLAFPN, self).__init__()
      self.first_level = (
          int(np.log2(down_ratio))
          if first_level is None
          else first_level
      )
      assert (
          self.first_level >= 0
      ), "first level in CenterNetDLAFPN should be greater or equal to 0, but received {}".format(
          self.first_level
      )
      self.down_ratio = down_ratio
      self.last_level = last_level
      scales = [
          2**i for i in range(len(in_channels[self.first_level :]))
      ]
      self.dla_up = DLAUp(
          self.first_level,
          in_channels[self.first_level :],
          scales,
          dcn_v2=dcn_v2,
      )
      self.out_channel = out_channel
      if out_channel == 0:
          self.out_channel = in_channels[self.first_level]
      self.ida_up = IDAUp(
          in_channels[self.first_level : self.last_level],
          self.out_channel,
          [2**i for i in range(self.last_level - self.first_level)],
          dcn_v2=dcn_v2,
      )
  
      self.with_sge = with_sge
      if self.with_sge:
          self.sge_attention = SpatialGate()
  
imports: import numpy
  import math
  import paddle
  import paddle.nn
  from paddle import ParamAttr
  from paddle.nn.initializer import Uniform
  import paddle.nn.functional
  from ppdet.core.workspace import register, serializable
  from ppdet.modeling.layers import ConvNormLayer
  from ppdet.modeling.backbones.hardnet import ConvLayer, HarDBlock
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 1 to create a new CenterNetDLAFPN object from inherited base classes: nn with example: obj = CenterNetDLAFPN(in_channels, down_ratio, last_level, out_channel, first_level, dcn_v2, with_sge)