class_docstr: "RetinaHead with separate BN.
  
  In RetinaHead, conv/norm layers are shared across different FPN levels,
  while in RetinaSepBNHead, conv layers are shared across different FPN
  levels, but BN layers are separated.
class_docstr_tok: ["``","RetinaHead","with","separate","BN",".","In","RetinaHead",",","conv\/norm","layers","are","shared","across","different","FPN","levels",",","while","in","RetinaSepBNHead",",","conv","layers","are","shared","across","different","FPN","levels",",","but","BN","layers","are","separated","."]
docstr: Initialize layers of the head.
docstr_tok: ["Initialize","layers","of","the","head","."]
code: def _init_layers(self) -> None:
      """Initialize layers of the head."""
      self.relu = nn.ReLU(inplace=True)
      self.cls_convs = nn.ModuleList()
      self.reg_convs = nn.ModuleList()
      for i in range(self.num_ins):
          cls_convs = nn.ModuleList()
          reg_convs = nn.ModuleList()
          for j in range(self.stacked_convs):
              chn = self.in_channels if j == 0 else self.feat_channels
              cls_convs.append(
                  ConvModule(
                      chn,
                      self.feat_channels,
                      3,
                      stride=1,
                      padding=1,
                      conv_cfg=self.conv_cfg,
                      norm_cfg=self.norm_cfg,
                  )
              )
              reg_convs.append(
                  ConvModule(
                      chn,
                      self.feat_channels,
                      3,
                      stride=1,
                      padding=1,
                      conv_cfg=self.conv_cfg,
                      norm_cfg=self.norm_cfg,
                  )
              )
          self.cls_convs.append(cls_convs)
          self.reg_convs.append(reg_convs)
      for i in range(self.stacked_convs):
          for j in range(1, self.num_ins):
              self.cls_convs[j][i].conv = self.cls_convs[0][i].conv
              self.reg_convs[j][i].conv = self.reg_convs[0][i].conv
      self.retina_cls = nn.Conv2d(
          self.feat_channels,
          self.num_base_priors * self.cls_out_channels,
          3,
          padding=1,
      )
      self.retina_reg = nn.Conv2d(
          self.feat_channels, self.num_base_priors * 4, 3, padding=1
      )
  
file_path: mmdetection/mmdet/models/dense_heads/retina_sepbn_head.py
imports: from typing import Tuple
  import torch.nn
  from mmcv.cnn import ConvModule
  from mmengine.model import bias_init_with_prob, normal_init
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.utils import OptConfigType, OptMultiConfig
  from .anchor_head import AnchorHead
label_desc: Use image node_id 2 for calling the RetinaSepBNHead obj's underlying member method code with example usage: obj._init_layers() without return types