class_docstr: Video 3D stem module. Provides stem operations of Conv, BN, ReLU, MaxPool
  on input data tensor for one or multiple pathways.
class_docstr_tok: ["Video","3D","stem","module",".","Provides","stem","operations","of","Conv",",","BN",",","ReLU",",","MaxPool","on","input","data","tensor","for","one","or","multiple","pathways","."]
docstr: The `__init__` method of any subclass should also contain these
  arguments. List size of 1 for single pathway models (C2D, I3D, Slow
  and etc), list size of 2 for two pathway models (SlowFast).
  
  Args:
      dim_in (list): the list of channel dimensions of the inputs.
      dim_out (list): the output dimension of the convolution in the stem
          layer.
      kernel (list): the kernels' size of the convolutions in the stem
          layers. Temporal kernel size, height kernel size, width kernel
          size in order.
      stride (list): the stride sizes of the convolutions in the stem
          layer. Temporal kernel stride, height kernel size, width kernel
          size in order.
      padding (list): the paddings' sizes of the convolutions 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.
      stem_func_name (string): name of the the stem function applied on
          input to the network.
docstr_tok: ["The","`","__init__","`","method","of","any","subclass","should","also","contain","these","arguments",".","List","size","of","1","for","single","pathway","models","(","C2D",",","I3D",",","Slow","and","etc",")",",","list","size","of","2","for","two","pathway","models","(","SlowFast",")",".","Args",":","dim_in","(","list",")",":","the","list","of","channel","dimensions","of","the","inputs",".","dim_out","(","list",")",":","the","output","dimension","of","the","convolution","in","the","stem","layer",".","kernel","(","list",")",":","the","kernels","'","size","of","the","convolutions","in","the","stem","layers",".","Temporal","kernel","size",",","height","kernel","size",",","width","kernel","size","in","order",".","stride","(","list",")",":","the","stride","sizes","of","the","convolutions","in","the","stem","layer",".","Temporal","kernel","stride",",","height","kernel","size",",","width","kernel","size","in","order",".","padding","(","list",")",":","the","paddings","'","sizes","of","the","convolutions","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",".","stem_func_name","(","string",")",":","name","of","the","the","stem","function","applied","on","input","to","the","network","."]
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,
      stem_func_name="basic_stem",
  ):
      """
      The `__init__` method of any subclass should also contain these
      arguments. List size of 1 for single pathway models (C2D, I3D, Slow
      and etc), list size of 2 for two pathway models (SlowFast).
  
      Args:
          dim_in (list): the list of channel dimensions of the inputs.
          dim_out (list): the output dimension of the convolution in the stem
              layer.
          kernel (list): the kernels' size of the convolutions in the stem
              layers. Temporal kernel size, height kernel size, width kernel
              size in order.
          stride (list): the stride sizes of the convolutions in the stem
              layer. Temporal kernel stride, height kernel size, width kernel
              size in order.
          padding (list): the paddings' sizes of the convolutions 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.
          stem_func_name (string): name of the the stem function applied on
              input to the network.
      """
      super(VideoModelStem, self).__init__()
  
      assert (
          len(
              {
                  len(dim_in),
                  len(dim_out),
                  len(kernel),
                  len(stride),
                  len(padding),
              }
          )
          == 1
      ), "Input pathway dimensions are not consistent. {} {} {} {} {}".format(
          len(dim_in),
          len(dim_out),
          len(kernel),
          len(stride),
          len(padding),
      )
  
      self.num_pathways = len(dim_in)
      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, stem_func_name)
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new VideoModelStem object from inherited base classes: nn with example: obj = VideoModelStem(dim_in, dim_out, kernel, stride, padding, inplace_relu, eps, bn_mmt, norm_module, stem_func_name)