class_docstr: Implements Conv3d (3x3x3 dw) + (optional) Bn + Activation layers.
  The conv layer has fixed kernel_size = (3,3,3), depthwise, zero padding size of
  (1,1,1), temporal stride = 1, dilation = 1
  
                    Input
                      |
                      ↓
                  conv3d (3x3x3 dw)
                      ↓
                  BatchNorm (optional)
                      ↓
                  Activation
  
  Current implementation of this layer in QNNPACK is reasonably efficient.
  
  convert_flag variable is to record whether the Conv3d3x3x3DwBnAct instance
  has been converted; Conv3d3x3x3DwBnAct is in original form if convert_flag is false,
  while it is in deployable form if convert_flag is true.
  
  Args:
      in_channels (int): number of channels for conv3d 3x3x3 dw.
      spatial_stride (tuple length of 2): spatial stride for conv.
      bias (bool): if true, use bias for conv.
      activation (str): applies selected activation from supported_act_functions.
          See activation_functions.py for more info about supported activations.
          Currently ReLU ('relu'), Swish ('swish'), Hardswish ('hswish'), Identity
          ('identity') are supported.
      use_bn (bool): if true, use batchnorm.
      norm_eps (float): epsilon for batchnorm.
      norm_momentum (float): momentum for batchnorm.
  
  Current implementation of this layer in Pytorch Mobile is efficient.
  Sidenote: QNNPACK has best support for dw with 3x3 spatial kernel.
  For other spatial kernels like 7x7 dw, the efficiency may be lower.
class_docstr_tok: ["Implements","Conv3d","(","3x3x3","dw",")","+","(","optional",")","Bn","+","Activation","layers",".","The","conv","layer","has","fixed","kernel_size","=","(","3,3,3",")",",","depthwise",",","zero","padding","size","of","(","1,1,1",")",",","temporal","stride","=","1",",","dilation","=","1","Input","|","\u2193","conv3d","(","3x3x3","dw",")","\u2193","BatchNorm","(","optional",")","\u2193","Activation","Current","implementation","of","this","layer","in","QNNPACK","is","reasonably","efficient",".","convert_flag","variable","is","to","record","whether","the","Conv3d3x3x3DwBnAct","instance","has","been","converted",";","Conv3d3x3x3DwBnAct","is","in","original","form","if","convert_flag","is","false",",","while","it","is","in","deployable","form","if","convert_flag","is","true",".","Args",":","in_channels","(","int",")",":","number","of","channels","for","conv3d","3x3x3","dw",".","spatial_stride","(","tuple","length","of","2",")",":","spatial","stride","for","conv",".","bias","(","bool",")",":","if","true",",","use","bias","for","conv",".","activation","(","str",")",":","applies","selected","activation","from","supported_act_functions",".","See","activation_functions.py","for","more","info","about","supported","activations",".","Currently","ReLU","(","'relu","'",")",",","Swish","(","'swish","'",")",",","Hardswish","(","'hswish","'",")",",","Identity","(","'identity","'",")","are","supported",".","use_bn","(","bool",")",":","if","true",",","use","batchnorm",".","norm_eps","(","float",")",":","epsilon","for","batchnorm",".","norm_momentum","(","float",")",":","momentum","for","batchnorm",".","Current","implementation","of","this","layer","in","Pytorch","Mobile","is","efficient",".","Sidenote",":","QNNPACK","has","best","support","for","dw","with","3x3","spatial","kernel",".","For","other","spatial","kernels","like","7x7","dw",",","the","efficiency","may","be","lower","."]
code: def __init__(
      self,
      in_channels: int,
      spatial_stride: int = 1,
      bias=False,
      activation: str = "relu",
      use_bn=True,
      norm_eps: float = 1e-5,
      norm_momentum: float = 0.1,
  ):
      super().__init__()
      kernel = OrderedDict()
      conv_stride = (1, spatial_stride, spatial_stride)
      kernel["conv"] = nn.Conv3d(
          in_channels,
          in_channels,
          kernel_size=(3, 3, 3),
          stride=conv_stride,
          groups=in_channels,
          padding=1,
          bias=bias,
      )
      if use_bn:
          kernel["bn"] = nn.BatchNorm3d(
              in_channels, eps=norm_eps, momentum=norm_momentum
          )
      assert (
          activation in supported_act_functions
      ), f"Conv3d3x3x3DwBnAct: {activation} is not in supported_act_functions."
      kernel["act"] = supported_act_functions[activation]()
      self.kernel = nn.Sequential(kernel)
  
      self.convert_flag = False
  
imports: import logging
  from collections import OrderedDict
  from typing import Tuple
  import torch
  import torch.nn
  from pytorchvideo.accelerator.efficient_blocks.efficient_block_base import EfficientBlockBase
  from .activation_functions import supported_act_functions
  from .conv_helper import _Conv3dTemporalKernel1Decomposed, _Conv3dTemporalKernel3Decomposed, _Conv3dTemporalKernel5Decomposed, _Reshape
label_desc: Use image node_id 1 to create a new Conv3d3x3x3DwBnAct object from inherited base classes: EfficientBlockBase with example: obj = Conv3d3x3x3DwBnAct(in_channels, spatial_stride, bias, activation, use_bn, norm_eps, norm_momentum)