code: def __init__(
      self,
      num_layers: int,
      num_input_features: int,
      bn_size: int,
      growth_rate: int,
      drop_rate: float,
      memory_efficient: bool = False,
  ) -> None:
      super(_DenseBlock, self).__init__()
      for i in range(num_layers):
          layer = _DenseLayer(
              num_input_features + i * growth_rate,
              growth_rate=growth_rate,
              bn_size=bn_size,
              drop_rate=drop_rate,
              memory_efficient=memory_efficient,
          )
          self.add_module("denselayer%d" % (i + 1), layer)
  
file_path: ARKitScenes/depth_upsampling/models/mspf/blocks/dense_net.py
imports: from typing import List
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
label_desc: Use image node_id 1 to create a new _DenseBlock object from inherited base classes: nn with example: obj = _DenseBlock(num_layers, num_input_features, bn_size, growth_rate, drop_rate, memory_efficient)