class_docstr: Bottleneck building block for ResNet50, ResNet101 and ResNet152.
  
  Parameters
  ----------
  inplanes : int.
      Input channels of each block.
  planes : int.
      Output channels of each block.
  strides : int, default is 1.
      Stride in convolution layers.
  head_conv : int, default is 1.
      Determin whether we do 1x1x1 convolution or 3x1x1 convolution.
  downsample : bool.
      Whether to contain a downsampling layer in the block.
  norm_layer : object
      Normalization layer used (default: :class:`mxnet.gluon.nn.BatchNorm`)
      Can be :class:`mxnet.gluon.nn.BatchNorm` or :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
  norm_kwargs : dict
      Additional `norm_layer` arguments, for example `num_devices=4`
      for :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
  layer_name : str, default is ''.
      Give a name to current block.
class_docstr_tok: ["Bottleneck","building","block","for","ResNet50",",","ResNet101","and","ResNet152",".","Parameters","--","--","--","--","--","inplanes",":","int",".","Input","channels","of","each","block",".","planes",":","int",".","Output","channels","of","each","block",".","strides",":","int",",","default","is","1",".","Stride","in","convolution","layers",".","head_conv",":","int",",","default","is","1",".","Determin","whether","we","do","1x1x1","convolution","or","3x1x1","convolution",".","downsample",":","bool",".","Whether","to","contain","a","downsampling","layer","in","the","block",".","norm_layer",":","object","Normalization","layer","used","(","default",":",":","class",":","`","mxnet.gluon.nn.BatchNorm","`",")","Can","be",":","class",":","`","mxnet.gluon.nn.BatchNorm","`","or",":","class",":","`","mxnet.gluon.contrib.nn.SyncBatchNorm","`",".","norm_kwargs",":","dict","Additional","`","norm_layer","`","arguments",",","for","example","`","num_devices=4","`","for",":","class",":","`","mxnet.gluon.contrib.nn.SyncBatchNorm","`",".","layer_name",":","str",",","default","is","``",".","Give","a","name","to","current","block","."]
code: def __init__(
      self,
      inplanes,
      planes,
      strides=1,
      downsample=None,
      head_conv=1,
      norm_layer=BatchNorm,
      norm_kwargs=None,
      layer_name="",
  ):
      super(Bottleneck, self).__init__()
  
      bottleneck = nn.HybridSequential(prefix=layer_name)
      with bottleneck.name_scope():
          if head_conv == 1:
              self.conv1 = nn.Conv3D(
                  in_channels=inplanes,
                  channels=planes,
                  kernel_size=1,
                  use_bias=False,
              )
              self.bn1 = norm_layer(
                  in_channels=planes,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
          elif head_conv == 3:
              self.conv1 = nn.Conv3D(
                  in_channels=inplanes,
                  channels=planes,
                  kernel_size=(3, 1, 1),
                  padding=(1, 0, 0),
                  use_bias=False,
              )
              self.bn1 = norm_layer(
                  in_channels=planes,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
          else:
              raise ValueError("Unsupported head_conv!")
          self.conv2 = nn.Conv3D(
              in_channels=planes,
              channels=planes,
              kernel_size=(1, 3, 3),
              strides=(1, strides, strides),
              padding=(0, 1, 1),
              use_bias=False,
          )
          self.bn2 = norm_layer(
              in_channels=planes,
              **({} if norm_kwargs is None else norm_kwargs),
          )
          self.conv3 = nn.Conv3D(
              in_channels=planes,
              channels=planes * self.expansion,
              kernel_size=1,
              strides=1,
              use_bias=False,
          )
          self.bn3 = norm_layer(
              in_channels=planes * self.expansion,
              gamma_initializer="zeros",
              **({} if norm_kwargs is None else norm_kwargs),
          )
          self.relu = nn.Activation("relu")
          self.downsample = downsample
  
imports: from mxnet import init
  from mxnet.context import cpu
  from mxnet.gluon.block import HybridBlock
  from mxnet.gluon import nn
  from mxnet.gluon.nn import BatchNorm
label_desc: Use image node_id 1 to create a new Bottleneck object from inherited base classes: HybridBlock with example: obj = Bottleneck(inplanes, planes, strides, downsample, head_conv, norm_layer, norm_kwargs, layer_name)