class_docstr: X3D transformation: 1x1x1, Tx3x3 (channelwise, num_groups=dim_in), 1x1x1,
      augmented with (optional) SE (squeeze-excitation) on the 3x3x3 output.
      T is the temporal kernel size (defaulting to 3)
class_docstr_tok: ["X3D","transformation",":","1x1x1",",","Tx3x3","(","channelwise",",","num_groups=dim_in",")",",","1x1x1",",","augmented","with","(","optional",")","SE","(","squeeze-excitation",")","on","the","3x3x3","output",".","T","is","the","temporal","kernel","size","(","defaulting","to","3",")"]
docstr: Args:
      dim_in (int): the channel dimensions of the input.
      dim_out (int): the channel dimension of the output.
      temp_kernel_size (int): the temporal kernel sizes of the middle
          convolution in the bottleneck.
      stride (int): the stride of the bottleneck.
      dim_inner (int): the inner dimension of the block.
      num_groups (int): number of groups for the convolution. num_groups=1
          is for standard ResNet like networks, and num_groups>1 is for
          ResNeXt like networks.
      stride_1x1 (bool): if True, apply stride to 1x1 conv, otherwise
          apply stride to the 3x3 conv.
      inplace_relu (bool): if True, 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.
      dilation (int): size of dilation.
      norm_module (nn.Module): nn.Module for the normalization layer. The
          default is nn.BatchNorm3d.
      se_ratio (float): if > 0, apply SE to the Tx3x3 conv, with the SE
          channel dimensionality being se_ratio times the Tx3x3 conv dim.
      swish_inner (bool): if True, apply swish to the Tx3x3 conv, otherwise
          apply ReLU to the Tx3x3 conv.
docstr_tok: ["Args",":","dim_in","(","int",")",":","the","channel","dimensions","of","the","input",".","dim_out","(","int",")",":","the","channel","dimension","of","the","output",".","temp_kernel_size","(","int",")",":","the","temporal","kernel","sizes","of","the","middle","convolution","in","the","bottleneck",".","stride","(","int",")",":","the","stride","of","the","bottleneck",".","dim_inner","(","int",")",":","the","inner","dimension","of","the","block",".","num_groups","(","int",")",":","number","of","groups","for","the","convolution",".","num_groups=1","is","for","standard","ResNet","like","networks",",","and","num_groups",">","1","is","for","ResNeXt","like","networks",".","stride_1x1","(","bool",")",":","if","True",",","apply","stride","to","1x1","conv",",","otherwise","apply","stride","to","the","3x3","conv",".","inplace_relu","(","bool",")",":","if","True",",","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",".","dilation","(","int",")",":","size","of","dilation",".","norm_module","(","nn.Module",")",":","nn.Module","for","the","normalization","layer",".","The","default","is","nn.BatchNorm3d",".","se_ratio","(","float",")",":","if",">","0",",","apply","SE","to","the","Tx3x3","conv",",","with","the","SE","channel","dimensionality","being","se_ratio","times","the","Tx3x3","conv","dim",".","swish_inner","(","bool",")",":","if","True",",","apply","swish","to","the","Tx3x3","conv",",","otherwise","apply","ReLU","to","the","Tx3x3","conv","."]
code: def __init__(
      self,
      dim_in,
      dim_out,
      temp_kernel_size,
      stride,
      dim_inner,
      num_groups,
      stride_1x1=False,
      inplace_relu=True,
      eps=1e-5,
      bn_mmt=0.1,
      dilation=1,
      norm_module=nn.BatchNorm3d,
      se_ratio=0.0625,
      swish_inner=True,
      block_idx=0,
  ):
      """
      Args:
          dim_in (int): the channel dimensions of the input.
          dim_out (int): the channel dimension of the output.
          temp_kernel_size (int): the temporal kernel sizes of the middle
              convolution in the bottleneck.
          stride (int): the stride of the bottleneck.
          dim_inner (int): the inner dimension of the block.
          num_groups (int): number of groups for the convolution. num_groups=1
              is for standard ResNet like networks, and num_groups>1 is for
              ResNeXt like networks.
          stride_1x1 (bool): if True, apply stride to 1x1 conv, otherwise
              apply stride to the 3x3 conv.
          inplace_relu (bool): if True, 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.
          dilation (int): size of dilation.
          norm_module (nn.Module): nn.Module for the normalization layer. The
              default is nn.BatchNorm3d.
          se_ratio (float): if > 0, apply SE to the Tx3x3 conv, with the SE
              channel dimensionality being se_ratio times the Tx3x3 conv dim.
          swish_inner (bool): if True, apply swish to the Tx3x3 conv, otherwise
              apply ReLU to the Tx3x3 conv.
      """
      super(X3DTransform, self).__init__()
      self.temp_kernel_size = temp_kernel_size
      self._inplace_relu = inplace_relu
      self._eps = eps
      self._bn_mmt = bn_mmt
      self._se_ratio = se_ratio
      self._swish_inner = swish_inner
      self._stride_1x1 = stride_1x1
      self._block_idx = block_idx
      self._construct(
          dim_in,
          dim_out,
          stride,
          dim_inner,
          num_groups,
          dilation,
          norm_module,
      )
  
imports: import torch
  import torch.nn
  from slowfast.models.common import drop_path
  from slowfast.models.nonlocal_helper import Nonlocal
  from slowfast.models.operators import SE, Swish
label_desc: Use image node_id 1 to create a new X3DTransform object from inherited base classes: nn with example: obj = X3DTransform(dim_in, dim_out, temp_kernel_size, stride, dim_inner, num_groups, stride_1x1, inplace_relu, eps, bn_mmt, dilation, norm_module, se_ratio, swish_inner, block_idx)