class_docstr: Implementation of 2+1d Convolution by factorizing 3D Convolution into an 1D temporal
  Convolution and a 2D spatial Convolution with Normalization and Activation module
  in between:
  
  ::
  
                      Conv_t (or Conv_xy if conv_xy_first = True)
                                         ↓
                                   Normalization
                                         ↓
                                     Activation
                                         ↓
                      Conv_xy (or Conv_t if conv_xy_first = True)
  
  The 2+1d Convolution is used to build the R(2+1)D network.
class_docstr_tok: ["Implementation","of","2+1d","Convolution","by","factorizing","3D","Convolution","into","an","1D","temporal","Convolution","and","a","2D","spatial","Convolution","with","Normalization","and","Activation","module","in","between",":",":",":","Conv_t","(","or","Conv_xy","if","conv_xy_first","=","True",")","\u2193","Normalization","\u2193","Activation","\u2193","Conv_xy","(","or","Conv_t","if","conv_xy_first","=","True",")","The","2+1d","Convolution","is","used","to","build","the","R","(","2+1",")","D","network","."]
docstr: Args:
      conv_t (torch.nn.modules): temporal convolution module.
      norm (torch.nn.modules): normalization module.
      activation (torch.nn.modules): activation module.
      conv_xy (torch.nn.modules): spatial convolution module.
      conv_xy_first (bool): If True, spatial convolution comes before temporal conv
docstr_tok: ["Args",":","conv_t","(","torch.nn.modules",")",":","temporal","convolution","module",".","norm","(","torch.nn.modules",")",":","normalization","module",".","activation","(","torch.nn.modules",")",":","activation","module",".","conv_xy","(","torch.nn.modules",")",":","spatial","convolution","module",".","conv_xy_first","(","bool",")",":","If","True",",","spatial","convolution","comes","before","temporal","conv"]
code: def __init__(
      self,
      *,
      conv_t: nn.Module = None,
      norm: nn.Module = None,
      activation: nn.Module = None,
      conv_xy: nn.Module = None,
      conv_xy_first: bool = False,
  ) -> None:
      """
      Args:
          conv_t (torch.nn.modules): temporal convolution module.
          norm (torch.nn.modules): normalization module.
          activation (torch.nn.modules): activation module.
          conv_xy (torch.nn.modules): spatial convolution module.
          conv_xy_first (bool): If True, spatial convolution comes before temporal conv
      """
      super().__init__()
      set_attributes(self, locals())
      assert self.conv_t is not None
      assert self.conv_xy is not None
  
file_path: pytorchvideo/pytorchvideo/layers/convolutions.py
imports: from typing import Callable, Optional, Tuple
  import torch
  import torch.nn
  from pytorchvideo.layers.utils import set_attributes
  from torch.nn.common_types import _size_3_t
label_desc: Use image node_id 1 to create a new Conv2plus1d object from inherited base classes: nn with example: obj = Conv2plus1d()