class_docstr: In PyText DocNN models we need a way to access word embedding layers,
  generate the embeddings and subtract the baseline.
  To do so, we separate embedding layers from the model, compute the embeddings
  separately and do all operations needed outside of the model.
  The original embedding layer is being replaced by `PyTextInterpretableEmbedding`
  layer which passes precomputed embedding vectors to lower layers.
class_docstr_tok: ["In","PyText","DocNN","models","we","need","a","way","to","access","word","embedding","layers",",","generate","the","embeddings","and","subtract","the","baseline",".","To","do","so",",","we","separate","embedding","layers","from","the","model",",","compute","the","embeddings","separately","and","do","all","operations","needed","outside","of","the","model",".","The","original","embedding","layer","is","being","replaced","by","`","PyTextInterpretableEmbedding","`","layer","which","passes","precomputed","embedding","vectors","to","lower","layers","."]
code: def __init__(self, embeddings) -> None:
      self.embedding_dims = [
          embedding.embedding_dim for embedding in embeddings
      ]
      super().__init__(sum(self.embedding_dims))
      self.embeddings = embeddings
  
imports: from collections import defaultdict
  import torch
  from pytext.models.embeddings.dict_embedding import DictEmbedding
  from pytext.models.embeddings.word_embedding import WordEmbedding
  from pytext.models.model import EmbeddingBase, EmbeddingList
label_desc: Use image node_id 1 to create a new PyTextInterpretableEmbedding object from inherited base classes: EmbeddingBase with example: obj = PyTextInterpretableEmbedding(embeddings)