class_docstr: ResNe(X)t 3D stem module.
  Performs spatiotemporal Convolution, BN, and Relu following by a
      spatiotemporal pooling.
class_docstr_tok: ["ResNe","(","X",")","t","3D","stem","module",".","Performs","spatiotemporal","Convolution",",","BN",",","and","Relu","following","by","a","spatiotemporal","pooling","."]
docstr: The `__init__` method of any subclass should also contain these arguments.
  
  Args:
      dim_in (int): the channel dimension of the input. Normally 3 is used
          for rgb input, and 2 or 3 is used for optical flow input.
      dim_out (int): the output dimension of the convolution in the stem
          layer.
      kernel (list): the kernel size of the convolution in the stem layer.
          temporal kernel size, height kernel size, width kernel size in
          order.
      stride (list): the stride size of the convolution in the stem layer.
          temporal kernel stride, height kernel size, width kernel size in
          order.
      padding (int): the padding size of the convolution in the stem
          layer, temporal padding size, height padding size, width
          padding size in order.
      inplace_relu (bool): calculate the relu on the original input
          without allocating new memory.
      eps (float): epsilon for batch norm.
      bn_mmt (float): momentum for batch norm. Noted that BN momentum in
          PyTorch = 1 - BN momentum in Caffe2.
      norm_module (nn.Module): nn.Module for the normalization layer. The
          default is nn.BatchNorm3d.
docstr_tok: ["The","`","__init__","`","method","of","any","subclass","should","also","contain","these","arguments",".","Args",":","dim_in","(","int",")",":","the","channel","dimension","of","the","input",".","Normally","3","is","used","for","rgb","input",",","and","2","or","3","is","used","for","optical","flow","input",".","dim_out","(","int",")",":","the","output","dimension","of","the","convolution","in","the","stem","layer",".","kernel","(","list",")",":","the","kernel","size","of","the","convolution","in","the","stem","layer",".","temporal","kernel","size",",","height","kernel","size",",","width","kernel","size","in","order",".","stride","(","list",")",":","the","stride","size","of","the","convolution","in","the","stem","layer",".","temporal","kernel","stride",",","height","kernel","size",",","width","kernel","size","in","order",".","padding","(","int",")",":","the","padding","size","of","the","convolution","in","the","stem","layer",",","temporal","padding","size",",","height","padding","size",",","width","padding","size","in","order",".","inplace_relu","(","bool",")",":","calculate","the","relu","on","the","original","input","without","allocating","new","memory",".","eps","(","float",")",":","epsilon","for","batch","norm",".","bn_mmt","(","float",")",":","momentum","for","batch","norm",".","Noted","that","BN","momentum","in","PyTorch","=","1","-","BN","momentum","in","Caffe2",".","norm_module","(","nn.Module",")",":","nn.Module","for","the","normalization","layer",".","The","default","is","nn.BatchNorm3d","."]
code: def __init__(
      self,
      dim_in,
      dim_out,
      kernel,
      stride,
      padding,
      inplace_relu=True,
      eps=1e-5,
      bn_mmt=0.1,
      norm_module=nn.BatchNorm3d,
  ):
      """
      The `__init__` method of any subclass should also contain these arguments.
  
      Args:
          dim_in (int): the channel dimension of the input. Normally 3 is used
              for rgb input, and 2 or 3 is used for optical flow input.
          dim_out (int): the output dimension of the convolution in the stem
              layer.
          kernel (list): the kernel size of the convolution in the stem layer.
              temporal kernel size, height kernel size, width kernel size in
              order.
          stride (list): the stride size of the convolution in the stem layer.
              temporal kernel stride, height kernel size, width kernel size in
              order.
          padding (int): the padding size of the convolution in the stem
              layer, temporal padding size, height padding size, width
              padding size in order.
          inplace_relu (bool): calculate the relu on the original input
              without allocating new memory.
          eps (float): epsilon for batch norm.
          bn_mmt (float): momentum for batch norm. Noted that BN momentum in
              PyTorch = 1 - BN momentum in Caffe2.
          norm_module (nn.Module): nn.Module for the normalization layer. The
              default is nn.BatchNorm3d.
      """
      super(ResNetBasicStem, self).__init__()
      self.kernel = kernel
      self.stride = stride
      self.padding = padding
      self.inplace_relu = inplace_relu
      self.eps = eps
      self.bn_mmt = bn_mmt
      # Construct the stem layer.
      self._construct_stem(dim_in, dim_out, norm_module)
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new ResNetBasicStem object from inherited base classes: nn with example: obj = ResNetBasicStem(dim_in, dim_out, kernel, stride, padding, inplace_relu, eps, bn_mmt, norm_module)