class_docstr: VGG Backbone network for single-shot-detection.
  
  Args:
      input_size (int): width and height of input, from {300, 512}.
      depth (int): Depth of vgg, from {11, 13, 16, 19}.
      out_indices (Sequence[int]): Output from which stages.
  
  Example:
      >>> self = SSDVGG(input_size=300, depth=11)
      >>> self.eval()
      >>> inputs = torch.rand(1, 3, 300, 300)
      >>> level_outputs = self.forward(inputs)
      >>> for level_out in level_outputs:
      ...     print(tuple(level_out.shape))
      (1, 1024, 19, 19)
      (1, 512, 10, 10)
      (1, 256, 5, 5)
      (1, 256, 3, 3)
      (1, 256, 1, 1)
class_docstr_tok: ["VGG","Backbone","network","for","single-shot-detection",".","Args",":","input_size","(","int",")",":","width","and","height","of","input",",","from","{","300",",","512","}",".","depth","(","int",")",":","Depth","of","vgg",",","from","{","11",",","13",",","16",",","19","}",".","out_indices","(","Sequence","[","int","]",")",":","Output","from","which","stages",".","Example",":",">",">",">","self","=","SSDVGG","(","input_size=300",",","depth=11",")",">",">",">","self.eval","(",")",">",">",">","inputs","=","torch.rand","(","1",",","3",",","300",",","300",")",">",">",">","level_outputs","=","self.forward","(","inputs",")",">",">",">","for","level_out","in","level_outputs",":","...","print","(","tuple","(","level_out.shape",")",")","(","1",",","1024",",","19",",","19",")","(","1",",","512",",","10",",","10",")","(","1",",","256",",","5",",","5",")","(","1",",","256",",","3",",","3",")","(","1",",","256",",","1",",","1",")"]
code: def __init__(
      self,
      input_size,
      depth,
      with_last_pool=False,
      ceil_mode=True,
      out_indices=(3, 4),
      out_feature_indices=(22, 34),
      l2_norm_scale=20.0,
  ):
      # TODO: in_channels for mmcv.VGG
      super(SSDVGG, self).__init__(
          depth,
          with_last_pool=with_last_pool,
          ceil_mode=ceil_mode,
          out_indices=out_indices,
      )
      assert input_size in (300, 512)
      self.input_size = input_size
  
      self.features.add_module(
          str(len(self.features)),
          nn.MaxPool2d(kernel_size=3, stride=1, padding=1),
      )
      self.features.add_module(
          str(len(self.features)),
          nn.Conv2d(512, 1024, kernel_size=3, padding=6, dilation=6),
      )
      self.features.add_module(
          str(len(self.features)), nn.ReLU(inplace=True)
      )
      self.features.add_module(
          str(len(self.features)), nn.Conv2d(1024, 1024, kernel_size=1)
      )
      self.features.add_module(
          str(len(self.features)), nn.ReLU(inplace=True)
      )
      self.out_feature_indices = out_feature_indices
  
      self.inplanes = 1024
      self.extra = self._make_extra_layers(
          self.extra_setting[input_size]
      )
      self.l2_norm = L2Norm(
          self.features[out_feature_indices[0] - 1].out_channels,
          l2_norm_scale,
      )
  
file_path: insightface/detection/scrfd/mmdet/models/backbones/ssd_vgg.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import VGG, constant_init, kaiming_init, normal_init, xavier_init
  from mmcv.runner import load_checkpoint
  from mmdet.utils import get_root_logger
  from ..builder import BACKBONES
label_desc: Use image node_id 1 to create a new SSDVGG object from inherited base classes: VGG with example: obj = SSDVGG(input_size, depth, with_last_pool, ceil_mode, out_indices, out_feature_indices, l2_norm_scale)