class_docstr: Encoder layer implemented by fairseq.
  This version only removes the "args" parameter, no other changes
  
  In the original paper each operation (multi-head attention or FFN) is
  postprocessed with: `dropout -> add residual -> layernorm`.
  In the tensor2tensor code they suggest that learning is more robust when
  preprocessing each layer with layernorm and postprocessing with:
  `dropout -> add residual`. We default to the approach in the paper, but the
  tensor2tensor approach can be enabled by setting
  normalize_before to True.
class_docstr_tok: ["Encoder","layer","implemented","by","fairseq",".","This","version","only","removes","the","``","args","''","parameter",",","no","other","changes","In","the","original","paper","each","operation","(","multi-head","attention","or","FFN",")","is","postprocessed","with",":","`","dropout","-",">","add","residual","-",">","layernorm","`",".","In","the","tensor2tensor","code","they","suggest","that","learning","is","more","robust","when","preprocessing","each","layer","with","layernorm","and","postprocessing","with",":","`","dropout","-",">","add","residual","`",".","We","default","to","the","approach","in","the","paper",",","but","the","tensor2tensor","approach","can","be","enabled","by","setting","normalize_before","to","True","."]
code: def residual_connection(self, x, residual):
      return residual + x
  
imports: import math
  import uuid
  from typing import Dict, Optional, List
  import torch
  from torch import Tensor, nn
  from torch.nn import Parameter, LayerNorm, Dropout
  from lightseq.training.ops.pytorch import util
  from lightseq.training.ops.pytorch.layer_base import TransformerEmbeddingLayerBase, TransformerEncoderLayerBase, TransformerDecoderLayerBase
  from .quantization import QuantLinear, TensorQuantizer, act_quant_config, weight_quant_config, out_quant_config, emb_quant_config
label_desc: Use image node_id 3 for calling the TransformerEncoderLayer obj's underlying member method code with example usage: obj.residual_connection(x, residual) and returns: unknown