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","."]
docstr: Converts the block into efficient form.
  For fp32 operation, or quantized but with older version of QNNPACK w/o native int8
  Conv3d support, this function converts Conv3d into equivalent Conv2d for Pytorch
  Mobile deployment.
  For quantized operation on new version of QNNPACK with native int8 Conv3d, this
  function will only apply operator fusion.
  Args:
      input_blob_size (tuple): blob size at the input of Conv3d3x3x3DwBnAct
          instance during forward.
      convert_for_quantize (bool): whether this module is intended to be quantized.
      native_conv3d_op_qnnpack (bool): whether the QNNPACK version has native int8
          Conv3d.
      kwargs (any): any keyword argument (unused).
docstr_tok: ["Converts","the","block","into","efficient","form",".","For","fp32","operation",",","or","quantized","but","with","older","version","of","QNNPACK","w\/o","native","int8","Conv3d","support",",","this","function","converts","Conv3d","into","equivalent","Conv2d","for","Pytorch","Mobile","deployment",".","For","quantized","operation","on","new","version","of","QNNPACK","with","native","int8","Conv3d",",","this","function","will","only","apply","operator","fusion",".","Args",":","input_blob_size","(","tuple",")",":","blob","size","at","the","input","of","Conv3d3x3x3DwBnAct","instance","during","forward",".","convert_for_quantize","(","bool",")",":","whether","this","module","is","intended","to","be","quantized",".","native_conv3d_op_qnnpack","(","bool",")",":","whether","the","QNNPACK","version","has","native","int8","Conv3d",".","kwargs","(","any",")",":","any","keyword","argument","(","unused",")","."]
code: def convert(
      self,
      input_blob_size: Tuple,
      convert_for_quantize: bool = False,
      native_conv3d_op_qnnpack: bool = False,
      **kwargs,
  ):
      """
      Converts the block into efficient form.
      For fp32 operation, or quantized but with older version of QNNPACK w/o native int8
      Conv3d support, this function converts Conv3d into equivalent Conv2d for Pytorch
      Mobile deployment.
      For quantized operation on new version of QNNPACK with native int8 Conv3d, this
      function will only apply operator fusion.
      Args:
          input_blob_size (tuple): blob size at the input of Conv3d3x3x3DwBnAct
              instance during forward.
          convert_for_quantize (bool): whether this module is intended to be quantized.
          native_conv3d_op_qnnpack (bool): whether the QNNPACK version has native int8
              Conv3d.
          kwargs (any): any keyword argument (unused).
      """
      assert (
          self.convert_flag is False
      ), "Conv3d3x3x3DwBnAct: already converted, cannot be converted twice."
      self.kernel.eval()
      # Fuse conv and bn if bn exists.
      if hasattr(self.kernel, "bn"):
          self.kernel = fuse_modules(self.kernel, ["conv", "bn"])
      # Convert Conv3d into equivalent Conv2d if using fp32 operation (convert_for_quantize
      # is False) or not using QNNPACK native conv3d (native_conv3d_op_qnnpack is False)
      if (convert_for_quantize is False) or (
          native_conv3d_op_qnnpack is False
      ):
          self.kernel.conv = _Conv3dTemporalKernel3Decomposed(
              self.kernel.conv, input_blob_size[2:]
          )
      # Convert activatiopn function
      self.kernel.act.convert(input_blob_size, **kwargs)
      """
          Since conv3d is converted into multiple conv2d,
          will not fuse conv with act to keep arithmetic equivalency.
          """
      self.convert_flag = True
      # Set new kernel in eval mode again
      self.kernel.eval()
  
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 2 for calling the Conv3d3x3x3DwBnAct obj's underlying member method code with example usage: obj.convert(input_blob_size, convert_for_quantize, native_conv3d_op_qnnpack) without return types