class_docstr: An embedding module represents a sequence of sentences
  
  Args:
      lstm_config (BiLSTM.Config): config of the lstm layer
      num_embeddings (int): Total number of words/tokens (vocabulary size).
      embedding_dim (int): Size of embedding vector.
      embeddings_weight (torch.Tensor): Pretrained weights to initialize the
          embedding table with.
      init_range (List[int]): Range of uniform distribution to initialize the
          weights with if `embeddings_weight` is None.
      unk_token_idx (int): Index of UNK token in the word vocabulary.
class_docstr_tok: ["An","embedding","module","represents","a","sequence","of","sentences","Args",":","lstm_config","(","BiLSTM.Config",")",":","config","of","the","lstm","layer","num_embeddings","(","int",")",":","Total","number","of","words\/tokens","(","vocabulary","size",")",".","embedding_dim","(","int",")",":","Size","of","embedding","vector",".","embeddings_weight","(","torch.Tensor",")",":","Pretrained","weights","to","initialize","the","embedding","table","with",".","init_range","(","List","[","int","]",")",":","Range","of","uniform","distribution","to","initialize","the","weights","with","if","`","embeddings_weight","`","is","None",".","unk_token_idx","(","int",")",":","Index","of","UNK","token","in","the","word","vocabulary","."]
code: def __init__(
      self,
      lstm_config: BiLSTM.Config,
      num_embeddings: int,
      word_embed_dim: int = 300,
      embeddings_weight: Optional[torch.Tensor] = None,
      init_range: Optional[List[int]] = None,
      init_std: Optional[float] = None,
      unk_token_idx: int = 0,
      padding_idx: Optional[int] = None,
      vocab: Optional[List[str]] = None,
  ) -> None:
      lstm = BiLSTM(lstm_config, word_embed_dim)
      output_embedding_dim = lstm.representation_dim
      EmbeddingBase.__init__(self, embedding_dim=output_embedding_dim)
      self.lstm = lstm
      self.num_lstm_directions = 2 if lstm_config.bidirectional else 1
  
      # Create word embedding
      self.word_embedding = nn.Embedding(
          num_embeddings,
          word_embed_dim,
          _weight=embeddings_weight,
          padding_idx=padding_idx,
      )
      if embeddings_weight is None:
          if init_range:
              self.word_embedding.weight.data.uniform_(
                  init_range[0], init_range[1]
              )
          if init_std:
              self.word_embedding.weight.data.normal_(
                  mean=0.0, std=init_std
              )
  
      # Initialize unk embedding with zeros
      # to guard the model against randomized decisions based on unknown words
      self.word_embedding.weight.data[unk_token_idx].fill_(0.0)
  
      self.vocab = vocab
      self.padding_idx = padding_idx
  
file_path: pytext/pytext/models/embeddings/word_seq_embedding.py
imports: from typing import List, Optional
  import torch
  from pytext.data.tensorizers import Tensorizer
  from pytext.models.embeddings.embedding_base import EmbeddingBase
  from pytext.models.representations.bilstm import BiLSTM
  from pytorch.text.fb.utils.config_utils import EmbedInitStrategy
  from pytorch.text.fb.utils.embeddings import PretrainedEmbedding
  from torch import nn
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 2 to create a new WordSeqEmbedding object from inherited base classes: EmbeddingBase with example: obj = WordSeqEmbedding(lstm_config, num_embeddings, word_embed_dim, embeddings_weight, init_range, init_std, unk_token_idx, padding_idx, vocab)