class_docstr: Hourglass Module for HourglassNet backbone.
  
  Generate module recursively and use BasicBlock as the base unit.
  
  Args:
      depth (int): Depth of current HourglassModule.
      stage_channels (list[int]): Feature channels of sub-modules in current
          and follow-up HourglassModule.
      stage_blocks (list[int]): Number of sub-modules stacked in current and
          follow-up HourglassModule.
      norm_cfg (dict): Dictionary to construct and config norm layer.
code: def __init__(
      self,
      depth,
      stage_channels,
      stage_blocks,
      norm_cfg=dict(type="BN", requires_grad=True),
  ):
      super(HourglassModule, self).__init__()
  
      self.depth = depth
  
      cur_block = stage_blocks[0]
      next_block = stage_blocks[1]
  
      cur_channel = stage_channels[0]
      next_channel = stage_channels[1]
  
      self.up1 = ResLayer(
          BasicBlock,
          cur_channel,
          cur_channel,
          cur_block,
          norm_cfg=norm_cfg,
      )
  
      self.low1 = ResLayer(
          BasicBlock,
          cur_channel,
          next_channel,
          cur_block,
          stride=2,
          norm_cfg=norm_cfg,
      )
  
      if self.depth > 1:
          self.low2 = HourglassModule(
              depth - 1, stage_channels[1:], stage_blocks[1:]
          )
      else:
          self.low2 = ResLayer(
              BasicBlock,
              next_channel,
              next_channel,
              next_block,
              norm_cfg=norm_cfg,
          )
  
      self.low3 = ResLayer(
          BasicBlock,
          next_channel,
          cur_channel,
          cur_block,
          norm_cfg=norm_cfg,
          downsample_first=False,
      )
  
      self.up2 = nn.Upsample(scale_factor=2)
  
file_path: insightface/detection/scrfd/mmdet/models/backbones/hourglass.py
imports: import torch.nn
  from mmcv.cnn import ConvModule
  from ..builder import BACKBONES
  from ..utils import ResLayer
  from .resnet import BasicBlock
label_desc: Use image node_id 1 to create a new HourglassModule object from inherited base classes: nn with example: obj = HourglassModule(depth, stage_channels, stage_blocks, norm_cfg)