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 _create_transformer_layer(self, config: Config, embed_dim: int):
      return TransformerLayer(
          embedding_dim=embed_dim,
          attention=MultiheadSelfAttention(
              embed_dim=embed_dim,
              num_heads=config.num_attention_heads,
              scaling=config.scaling,
          ),
          residual_mlp=ResidualMLP(
              input_dim=embed_dim,
              hidden_dims=[config.ffnn_embed_dim],
              dropout=config.dropout,
          ),
      )
  
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 2 for calling the TransformerRepresentation obj's underlying member method code with example usage: obj._create_transformer_layer(config, embed_dim) and returns: TransformerLayer