class_docstr: Basic building block for ResNet18 and ResNet34.
  Not supported for I3D at this moment.
class_docstr_tok: ["Basic","building","block","for","ResNet18","and","ResNet34",".","Not","supported","for","I3D","at","this","moment","."]
code: def __init__(
      self,
      inplanes,
      planes,
      spatial_stride=1,
      temporal_stride=1,
      dilation=1,
      downsample=None,
      if_inflate=True,
      inflate_style=None,
      norm_layer=BatchNorm,
      norm_kwargs=None,
      layer_name="",
      **kwargs,
  ):
      super(BasicBlock, self).__init__()
  
      self.basicblock = nn.HybridSequential(prefix=layer_name)
      with self.basicblock.name_scope():
          if if_inflate:
              self.conv1 = conv3x3x3(
                  inplanes,
                  planes,
                  spatial_stride,
                  temporal_stride,
                  dilation,
              )
          else:
              self.conv1 = conv1x3x3(
                  inplanes,
                  planes,
                  spatial_stride,
                  temporal_stride,
                  dilation,
              )
          self.bn1 = norm_layer(
              **({} if norm_kwargs is None else norm_kwargs)
          )
          self.relu = nn.Activation("relu")
          if if_inflate:
              self.conv2 = conv3x3x3(planes, planes)
          else:
              self.conv2 = conv1x3x3(planes, planes)
          self.bn2 = norm_layer(
              **({} if norm_kwargs is None else norm_kwargs)
          )
  
          self.basicblock.add(self.conv1)
          self.basicblock.add(self.bn1)
          self.basicblock.add(self.relu)
          self.basicblock.add(self.conv2)
          self.basicblock.add(self.bn2)
  
          self.downsample = downsample
          self.spatial_stride = spatial_stride
          self.temporal_stride = temporal_stride
          self.dilation = dilation
  
imports: from mxnet import nd
  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
  from ..resnetv1b import resnet50_v1b, resnet101_v1b
  from .non_local import build_nonlocal_block
label_desc: Use image node_id 1 to create a new BasicBlock object from inherited base classes: HybridBlock with example: obj = BasicBlock(inplanes, planes, spatial_stride, temporal_stride, dilation, downsample, if_inflate, inflate_style, norm_layer, norm_kwargs, layer_name)