class_docstr: ResBlock for P3D
  
  Parameters
  ----------
  inplanes : int.
      Input channels of each block.
  planes : int.
      Output channels of each block.
  spatial_stride : int, default is 1.
      Stride in spatial dimension of convolutional layers in a block.
  temporal_stride : int, default is 1.
      Stride in temporal dimension of convolutional layers in a block.
  dilation : int, default is 1.
      Dilation of convolutional layers in a block.
  downsample : bool.
      Whether to contain a downsampling layer in the block.
  num_layers : int.
      The current depth of this layer.
  depth_3d : int.
      Number of 3D layers in the network. For example,
      a P3D with ResNet50 backbone has a depth_3d of 13, which is the sum of 3, 4 and 6.
  block_design : tuple of str.
      Different designs for each block, from 'A', 'B' or 'C'.
  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: ["ResBlock","for","P3D","Parameters","--","--","--","--","--","inplanes",":","int",".","Input","channels","of","each","block",".","planes",":","int",".","Output","channels","of","each","block",".","spatial_stride",":","int",",","default","is","1",".","Stride","in","spatial","dimension","of","convolutional","layers","in","a","block",".","temporal_stride",":","int",",","default","is","1",".","Stride","in","temporal","dimension","of","convolutional","layers","in","a","block",".","dilation",":","int",",","default","is","1",".","Dilation","of","convolutional","layers","in","a","block",".","downsample",":","bool",".","Whether","to","contain","a","downsampling","layer","in","the","block",".","num_layers",":","int",".","The","current","depth","of","this","layer",".","depth_3d",":","int",".","Number","of","3D","layers","in","the","network",".","For","example",",","a","P3D","with","ResNet50","backbone","has","a","depth_3d","of","13",",","which","is","the","sum","of","3",",","4","and","6.","block_design",":","tuple","of","str",".","Different","designs","for","each","block",",","from","'","A","'",",","'","B","'","or","'","C","'",".","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,
      spatial_stride=1,
      temporal_stride=1,
      dilation=1,
      downsample=None,
      num_layers=0,
      depth_3d=13,
      block_design=("A", "B", "C"),
      norm_layer=BatchNorm,
      norm_kwargs=None,
      layer_name="",
      **kwargs,
  ):
      super(Bottleneck, self).__init__()
      self.inplanes = inplanes
      self.planes = planes
      self.spatial_tride = spatial_stride
      self.temporal_tride = temporal_stride
      self.dilation = dilation
      self.downsample = downsample
      self.num_layers = num_layers
      self.depth_3d = depth_3d
      self.block_design = block_design
      self.cycle = len(self.block_design)
  
      if self.downsample is not None:
          strides = (1, 2, 2)
      else:
          strides = spatial_stride
  
      with self.name_scope():
          # first block
          if self.num_layers < self.depth_3d:
              if self.num_layers == 0:
                  strides = 1
              self.conv1 = nn.Conv3D(
                  in_channels=inplanes,
                  channels=planes,
                  kernel_size=1,
                  strides=strides,
                  use_bias=False,
              )
              self.bn1 = norm_layer(
                  in_channels=planes,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
          else:
              if self.num_layers == self.depth_3d:
                  strides = 2
              else:
                  strides = 1
              self.conv1 = nn.Conv2D(
                  in_channels=inplanes,
                  channels=planes,
                  kernel_size=1,
                  strides=strides,
                  use_bias=False,
              )
              self.bn1 = norm_layer(
                  in_channels=planes,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
  
          # second block
          self.block_id = int(num_layers)
          self.design = list(self.block_design)[
              self.block_id % self.cycle
          ]
          if self.num_layers < self.depth_3d:
              self.conv2 = conv1x3x3(planes, planes)
              self.bn2 = norm_layer(
                  in_channels=planes,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
  
              self.conv_temporal = conv3x1x1(planes, planes)
              self.bn_temporal = norm_layer(
                  in_channels=planes,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
          else:
              self.conv2 = nn.Conv2D(
                  in_channels=planes,
                  channels=planes,
                  kernel_size=3,
                  strides=1,
                  padding=1,
                  use_bias=False,
              )
              self.bn2 = norm_layer(
                  in_channels=planes,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
  
          # third block
          if self.num_layers < self.depth_3d:
              self.conv3 = nn.Conv3D(
                  in_channels=planes,
                  channels=planes * self.expansion,
                  kernel_size=1,
                  use_bias=False,
              )
              self.bn3 = norm_layer(
                  in_channels=planes * self.expansion,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
          else:
              self.conv3 = nn.Conv2D(
                  in_channels=planes,
                  channels=planes * self.expansion,
                  kernel_size=1,
                  use_bias=False,
              )
              self.bn3 = norm_layer(
                  in_channels=planes * self.expansion,
                  **({} if norm_kwargs is None else norm_kwargs),
              )
  
          self.relu = nn.Activation("relu")
  
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, spatial_stride, temporal_stride, dilation, downsample, num_layers, depth_3d, block_design, norm_layer, norm_kwargs, layer_name)