class_docstr: Implements a X3D style residual block with optional squeeze-excite (SE)
  using efficient blocks.
  
                  Input +----------------------+
                  |                            |
                  v                            |
                  conv3d[0] (1x1x1)            |
                  |                            |
                  v                            |
                  batchNorm (optional)         |
                  |                            |
                  v                            |
                  activation[0]                |
                  |                            |
                  v                            |
                  conv3d[1] (3x3x3 dw)         |
                  |                            |
                  v                            |
                  batchNorm (optional)         |
                  |                            |
                  v                            |
                  Squeeze-Excite (optional)    |
                  |                            |
                  v                            |
                  activation[1]                |
                  |                            |
                  v                            |
                  conv3d[2] (1x1x1)            |
                  |                            |
                  v                            |
                  batchNorm (optional)         |
                  |                            |
                  v                            |
                  sum  <-----------------------+
                  |
                  v
                  activation[2]
  
  Args:
      in_channels (int): input channels for for 1x1x1 conv3d[0].
      mid_channels (int): channels for 3x3x3 dw conv3d[1].
      out_channels (int): output channels for 1x1x1 conv3d[2].
      spatial_stride (int): spatial stride for 3x3x3 dw conv3d[1].
      se_ratio (float): if > 0, apply SE to the 3x3x3 dw conv3d[1], with the SE
          channel dimensionality being se_ratio times the 3x3x3 conv dim.
      bias (tuple of bool): if bias[i] is true, use bias for conv3d[i].
      act_functions (tuple of str): act_functions[i] is the activation function after
          conv3d[i]. act_functions[i] should be a key in dict 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 (tuple of bool): if use_bn[i] is true, use batchnorm after conv3d[i].
      norm_eps (float): epsilon for batchnorm.
      norm_momentum (float): momentum for batchnorm.
class_docstr_tok: ["Implements","a","X3D","style","residual","block","with","optional","squeeze-excite","(","SE",")","using","efficient","blocks",".","Input","+","--","--","--","--","--","--","--","--","--","--","--","+","|","|","v","|","conv3d","[","0","]","(","1x1x1",")","|","|","|","v","|","batchNorm","(","optional",")","|","|","|","v","|","activation","[","0","]","|","|","|","v","|","conv3d","[","1","]","(","3x3x3","dw",")","|","|","|","v","|","batchNorm","(","optional",")","|","|","|","v","|","Squeeze-Excite","(","optional",")","|","|","|","v","|","activation","[","1","]","|","|","|","v","|","conv3d","[","2","]","(","1x1x1",")","|","|","|","v","|","batchNorm","(","optional",")","|","|","|","v","|","sum","<","--","--","--","--","--","--","--","--","--","--","--","-+","|","v","activation","[","2","]","Args",":","in_channels","(","int",")",":","input","channels","for","for","1x1x1","conv3d","[","0","]",".","mid_channels","(","int",")",":","channels","for","3x3x3","dw","conv3d","[","1","]",".","out_channels","(","int",")",":","output","channels","for","1x1x1","conv3d","[","2","]",".","spatial_stride","(","int",")",":","spatial","stride","for","3x3x3","dw","conv3d","[","1","]",".","se_ratio","(","float",")",":","if",">","0",",","apply","SE","to","the","3x3x3","dw","conv3d","[","1","]",",","with","the","SE","channel","dimensionality","being","se_ratio","times","the","3x3x3","conv","dim",".","bias","(","tuple","of","bool",")",":","if","bias","[","i","]","is","true",",","use","bias","for","conv3d","[","i","]",".","act_functions","(","tuple","of","str",")",":","act_functions","[","i","]","is","the","activation","function","after","conv3d","[","i","]",".","act_functions","[","i","]","should","be","a","key","in","dict","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","(","tuple","of","bool",")",":","if","use_bn","[","i","]","is","true",",","use","batchnorm","after","conv3d","[","i","]",".","norm_eps","(","float",")",":","epsilon","for","batchnorm",".","norm_momentum","(","float",")",":","momentum","for","batchnorm","."]
code: def forward(self, x):
      out = self.layers(x)
      if self._use_residual:
          if self._res_proj is not None:
              x = self._res_proj(x)
          out = self._residual_add_func.add(x, out)
      out = self.final_act(out)
      return out
  
file_path: pytorchvideo/pytorchvideo/models/accelerator/mobile_cpu/residual_blocks.py
imports: from collections import OrderedDict
  from typing import Optional, Tuple
  import torch.nn
  from pytorchvideo.accelerator.efficient_blocks.efficient_block_base import EfficientBlockBase
  from pytorchvideo.layers.accelerator.mobile_cpu.activation_functions import supported_act_functions
  from pytorchvideo.layers.accelerator.mobile_cpu.attention import SqueezeExcitation
  from pytorchvideo.layers.accelerator.mobile_cpu.convolutions import Conv3d3x3x3DwBnAct, Conv3dPwBnAct, Conv3dTemporalKernel1BnAct
  from pytorchvideo.layers.utils import round_width
label_desc: Use image node_id 2 for calling the X3dBottleneckBlock obj's underlying member method code with example usage: obj.forward(x) and returns: out