class_docstr: Temporal Transformer
  
  Args:
      - width (`int`):
          Dimension used in Residual Attention.
      - layers (`int`):
          Number of layers.
      - heads (`int`):
          Number of heads.
      - attn_mask (`torch.Tensor`):
          Attention mask.
class_docstr_tok: ["Temporal","Transformer","Args",":","-","width","(","`","int","`",")",":","Dimension","used","in","Residual","Attention",".","-","layers","(","`","int","`",")",":","Number","of","layers",".","-","heads","(","`","int","`",")",":","Number","of","heads",".","-","attn_mask","(","`","torch.Tensor","`",")",":","Attention","mask","."]
code: def __init__(
      self,
      width: int,
      layers: int,
      heads: int,
      attn_mask: torch.Tensor = None,
  ):
      super().__init__()
      self.width = width
      self.layers = layers
      self.resblocks = nn.Sequential(
          *[
              ResidualAttentionBlock(width, heads, attn_mask)
              for _ in range(layers)
          ]
      )
  
imports: import torch
  from torch import nn
  from collections import OrderedDict
  from towhee.models.utils.weight_init import trunc_normal_
  from towhee.models.utils.init_vit_weights import init_vit_weights
label_desc: Use image node_id 1 to create a new TemporalTransformer object from inherited base classes: nn with example: obj = TemporalTransformer(width, layers, heads, attn_mask)