docstr: Bottleneck block for ResNeXt.
  
  If style is "pytorch", the stride-two layer is the 3x3 conv layer, if
  it is "caffe", the stride-two layer is the first 1x1 conv layer.
docstr_tok: ["Bottleneck","block","for","ResNeXt",".","If","style","is","``","pytorch","''",",","the","stride-two","layer","is","the","3x3","conv","layer",",","if","it","is","``","caffe","''",",","the","stride-two","layer","is","the","first","1x1","conv","layer","."]
code: def __init__(
      self,
      inplanes,
      planes,
      groups=1,
      base_width=4,
      base_channels=64,
      **kwargs,
  ):
      """Bottleneck block for ResNeXt.
  
      If style is "pytorch", the stride-two layer is the 3x3 conv layer, if
      it is "caffe", the stride-two layer is the first 1x1 conv layer.
      """
      super(Bottleneck, self).__init__(inplanes, planes, **kwargs)
  
      if groups == 1:
          width = self.planes
      else:
          width = (
              math.floor(self.planes * (base_width / base_channels))
              * groups
          )
  
      self.norm1_name, norm1 = build_norm_layer(
          self.norm_cfg, width, postfix=1
      )
      self.norm2_name, norm2 = build_norm_layer(
          self.norm_cfg, width, postfix=2
      )
      self.norm3_name, norm3 = build_norm_layer(
          self.norm_cfg, self.planes * self.expansion, postfix=3
      )
  
      self.conv1 = build_conv_layer(
          self.conv_cfg,
          self.inplanes,
          width,
          kernel_size=1,
          stride=self.conv1_stride,
          bias=False,
      )
      self.add_module(self.norm1_name, norm1)
      fallback_on_stride = False
      self.with_modulated_dcn = False
      if self.with_dcn:
          fallback_on_stride = self.dcn.pop("fallback_on_stride", False)
      if not self.with_dcn or fallback_on_stride:
          self.conv2 = build_conv_layer(
              self.conv_cfg,
              width,
              width,
              kernel_size=3,
              stride=self.conv2_stride,
              padding=self.dilation,
              dilation=self.dilation,
              groups=groups,
              bias=False,
          )
      else:
          assert self.conv_cfg is None, "conv_cfg must be None for DCN"
          self.conv2 = build_conv_layer(
              self.dcn,
              width,
              width,
              kernel_size=3,
              stride=self.conv2_stride,
              padding=self.dilation,
              dilation=self.dilation,
              groups=groups,
              bias=False,
          )
  
      self.add_module(self.norm2_name, norm2)
      self.conv3 = build_conv_layer(
          self.conv_cfg,
          width,
          self.planes * self.expansion,
          kernel_size=1,
          bias=False,
      )
      self.add_module(self.norm3_name, norm3)
  
file_path: insightface/detection/scrfd/mmdet/models/backbones/resnext.py
imports: import math
  from mmcv.cnn import build_conv_layer, build_norm_layer
  from ..builder import BACKBONES
  from ..utils import ResLayer
  from .resnet import Bottleneck
  from .resnet import ResNet
label_desc: Use image node_id 1 to create a new Bottleneck object from inherited base classes: _Bottleneck with example: obj = Bottleneck(inplanes, planes, groups, base_width, base_channels)