class_docstr: Representation consisting of stacked multi-head self-attention
  and position-wise feed-forward layers. Unlike `Transformer`, we assume
  inputs are already embedded, thus this representation can be used as
  a drop-in replacement for other temporal representations over
  text inputs (e.g., `BiLSTM` and `DeepCNNDeepCNNRepresentation`).
code: def __init__(self, config: Config, embed_dim: int) -> None:
      super().__init__()
  
      self.layers = nn.ModuleList(
          [
              self._create_transformer_layer(config, embed_dim)
              for _ in range(config.num_layers)
          ]
      )
  
      log_class_usage(__class__)
  
file_path: pytext/pytext/models/representations/transformer/representation.py
imports: from typing import Optional
  import torch.nn
  from pytext.config import ConfigBase
  from pytext.models.module import Module
  from pytext.utils.usage import log_class_usage
  from pytorch.text.fb.nn.modules.multihead_attention import MultiheadSelfAttention
  from pytorch.text.fb.nn.modules.residual_mlp import ResidualMLP
  from pytorch.text.fb.nn.modules.transformer import TransformerLayer
  from torch import Tensor
label_desc: Use image node_id 1 to create a new TransformerRepresentation object from inherited base classes: Module with example: obj = TransformerRepresentation(config, embed_dim)