class_docstr: A wrapper around the embedding layer, which can be randomly initialized or
  loaded from a .npy file. Also supports normalization of embeddings to have
  zero mean and unit variance (weighted by token frequency) - this is useful
  for example when creating adversarial perturbations of the embeddings that
  should have norms relative to the embeddings' norms.
class_docstr_tok: ["A","wrapper","around","the","embedding","layer",",","which","can","be","randomly","initialized","or","loaded","from","a",".npy","file",".","Also","supports","normalization","of","embeddings","to","have","zero","mean","and","unit","variance","(","weighted","by","token","frequency",")","-","this","is","useful","for","example","when","creating","adversarial","perturbations","of","the","embeddings","that","should","have","norms","relative","to","the","embeddings","'","norms","."]
code: def forward(self, x):
      x = super().forward(x)
  
      if self.normalize:
          if self.training:
              self._update_normalize_params(x)
          x = (x - self.mean) / torch.sqrt(self.var + 1e-6)
  
      return x
  
imports: import abc
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqIncrementalDecoder, transformer
  from pytorch_translate import rnn_cell, utils, vocab_reduction
  from pytorch_translate.research.lexical_choice import lexical_translation
label_desc: Use image node_id 2 for calling the Embedding obj's underlying member method code with example usage: obj.forward(x) and returns: x