class_docstr: Wrapper for torch.nn.TransformerEncoder that handles masked inputs.
class_docstr_tok: ["Wrapper","for","torch.nn.TransformerEncoder","that","handles","masked","inputs","."]
docstr: Args:
    dim_in (int): input feature dimension
    num_heads (int): number of heads in the nn.MultiHeadAttention layers
    num_layers (int): the number of sub-encoder-layers in the encoder
docstr_tok: ["Args",":","dim_in","(","int",")",":","input","feature","dimension","num_heads","(","int",")",":","number","of","heads","in","the","nn.MultiHeadAttention","layers","num_layers","(","int",")",":","the","number","of","sub-encoder-layers","in","the","encoder"]
code: def __init__(
      self,
      dim_in: int,
      num_heads: int = 1,
      num_layers: int = 1,
  ):
      """
      Args:
        dim_in (int): input feature dimension
        num_heads (int): number of heads in the nn.MultiHeadAttention layers
        num_layers (int): the number of sub-encoder-layers in the encoder
      """
      super().__init__()
      self.encoder = nn.TransformerEncoder(
          nn.TransformerEncoderLayer(dim_in, num_heads), num_layers
      )
  
imports: from typing import List, Optional, Tuple
  import torch
  from pytorchvideo.layers.utils import set_attributes
  from torch import nn
  from torch.nn.utils.rnn import pack_padded_sequence
label_desc: Use image node_id 1 to create a new TransposeTransformerEncoder object from inherited base classes: nn with example: obj = TransposeTransformerEncoder(dim_in, num_heads, num_layers)