class_docstr: ## DeepNorm Normalization
  
  $$x_{l + 1} = \mathop{LN}\Big( lpha x_l + \mathop{G}_l ig(x_l,    heta_l ig)\Big)$$
class_docstr_tok: ["#","#","DeepNorm","Normalization","$","$","x_","{","l","+","1","}","=","\\mathop","{","LN","}","\\Big","(","\u0007lpha","x_l","+","\\mathop","{","G","}","_l","\big","(","x_l",",","heta_l","\big",")","\\Big",")","$","$"]
docstr: :param x: is the output from the previous layer $x_l$
  :param gx: is the output of the current sub-layer $\mathop{G}_l (x_l,   heta_l)$
docstr_tok: [":","param","x",":","is","the","output","from","the","previous","layer","$","x_l","$",":","param","gx",":","is","the","output","of","the","current","sub-layer","$","\\mathop","{","G","}","_l","(","x_l",",","heta_l",")","$"]
code: def forward(self, x: torch.Tensor, gx: torch.Tensor):
      """
      :param x: is the output from the previous layer $x_l$
      :param gx: is the output of the current sub-layer $\mathop{G}_l (x_l, \theta_l)$
      """
      # $$x_{l + 1} = \mathop{LN}\Big( \alpha x_l + \mathop{G}_l \big(x_l, \theta_l \big)\Big)$$
      return self.layer_norm(x + self.alpha * gx)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/normalization/deep_norm/__init__.py
imports: from typing import Union, List
  import torch
  from torch import nn, Size
  from labml_nn.normalization.layer_norm import LayerNorm
  from labml_nn.transformers import MultiHeadAttention
  from labml_nn.transformers.feed_forward import FeedForward
  from labml_nn.transformers.utils import subsequent_mask
label_desc: Use image node_id 2 for calling the DeepNorm obj's underlying member method code with example usage: obj.forward(x, gx) and returns: self