class_docstr: Implements Conv3d (3x1x1) + (optional) Bn + Activation for pointwise layers.
  The conv layer has fixed kernel of (3, 1, 1), zero padding size of
  (1, 0, 0), stride = (1, 1, 1), dilation = 1.
  
                    Input
                      |
                      ↓
                  conv3d (3x1x1)
                      ↓
                  BatchNorm (optional)
                      ↓
                  Activation
  
  For regular convolution (i.e., groups=1), current implementation of this layer in
  QNNPACK is reasonably efficient.
  For depthwise convolution (i.e., groups=out_channels), current implementation of this
  layer in QNNPACK is not efficient as Conv3d3x3x3DwBnRelu, as QNNPACK does not have
  optimization for 1x1 depthwise convolution. The latencies of fp32 operation are similar
  for Conv3d3x1x1BnAct and Conv3d3x3x3DwBnRelu, while with int8 operation Conv3d3x1x1BnAct
  is 1.5X slower than Conv3d3x3x3DwBnRelu.
  
  self.convert_flag property records whether the Conv3d3x1x1BnAct instance has been
  converted; Conv3d3x1x1BnAct 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 input channels for conv3d 3x1x1.
      out_channels (int): number of output channels for conv3d 3x1x1.
      groups (int): number of groups 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.
class_docstr_tok: ["Implements","Conv3d","(","3x1x1",")","+","(","optional",")","Bn","+","Activation","for","pointwise","layers",".","The","conv","layer","has","fixed","kernel","of","(","3",",","1",",","1",")",",","zero","padding","size","of","(","1",",","0",",","0",")",",","stride","=","(","1",",","1",",","1",")",",","dilation","=","1",".","Input","|","\u2193","conv3d","(","3x1x1",")","\u2193","BatchNorm","(","optional",")","\u2193","Activation","For","regular","convolution","(","i.e.",",","groups=1",")",",","current","implementation","of","this","layer","in","QNNPACK","is","reasonably","efficient",".","For","depthwise","convolution","(","i.e.",",","groups=out_channels",")",",","current","implementation","of","this","layer","in","QNNPACK","is","not","efficient","as","Conv3d3x3x3DwBnRelu",",","as","QNNPACK","does","not","have","optimization","for","1x1","depthwise","convolution",".","The","latencies","of","fp32","operation","are","similar","for","Conv3d3x1x1BnAct","and","Conv3d3x3x3DwBnRelu",",","while","with","int8","operation","Conv3d3x1x1BnAct","is","1.5X","slower","than","Conv3d3x3x3DwBnRelu",".","self.convert_flag","property","records","whether","the","Conv3d3x1x1BnAct","instance","has","been","converted",";","Conv3d3x1x1BnAct","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","input","channels","for","conv3d","3x1x1",".","out_channels","(","int",")",":","number","of","output","channels","for","conv3d","3x1x1",".","groups","(","int",")",":","number","of","groups","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","."]
docstr: Converts Conv3d into equivalent Conv2d for Pytorch Mobile deployment
docstr_tok: ["Converts","Conv3d","into","equivalent","Conv2d","for","Pytorch","Mobile","deployment"]
code: def convert(
      self,
      input_blob_size,
      **kwargs,
  ):
      """
      Converts Conv3d into equivalent Conv2d for Pytorch Mobile deployment
  
      """
      assert (
          self.convert_flag is False
      ), "Conv3d3x1x1BnAct: 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"])
      self.kernel.conv = _Conv3dTemporalKernel3Decomposed(
          self.kernel.conv, input_blob_size[2:]
      )
      # Convert activation function
      self.kernel.act.convert(input_blob_size, **kwargs)
      # Since conv3d is converted into multiple conv2d, will not fuse conv with relu
      # to keep arithmetic equivalency.
      self.convert_flag = True
      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 Conv3d3x1x1BnAct obj's underlying member method code with example usage: obj.convert(input_blob_size) without return types