code: def __init__(
      self,
      in_channels,
      growth_rate,
      grmul,
      n_layers,
      keepBase=False,
      residual_out=False,
      dwconv=False,
  ):
      super().__init__()
      self.keepBase = keepBase
      self.links = []
      layers_ = []
      self.out_channels = 0
      for i in range(n_layers):
          outch, inch, link = self.get_link(
              i + 1, in_channels, growth_rate, grmul
          )
          self.links.append(link)
          if dwconv:
              layers_.append(CombConvLayer(inch, outch))
          else:
              layers_.append(ConvLayer(inch, outch))
  
          if (i % 2 == 0) or (i == n_layers - 1):
              self.out_channels += outch
      self.layers = nn.LayerList(layers_)
  
file_path: PaddleDetection/ppdet/modeling/backbones/hardnet.py
imports: import paddle
  import paddle.nn
  from ppdet.core.workspace import register
  from ..shape_spec import ShapeSpec
label_desc: Use image node_id 1 to create a new HarDBlock object from inherited base classes: nn with example: obj = HarDBlock(in_channels, growth_rate, grmul, n_layers, keepBase, residual_out, dwconv)