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","."]
docstr: Args:
      seq_token_idx : shape [batch_size * max_seq_len * max_token_count]
      seq_token_count : shape [batch_size * max_seq_len]
  Return:
      embedding : shape (batch_size * max_seq_len * output_dim)
docstr_tok: ["Args",":","seq_token_idx",":","shape","[","batch_size","*","max_seq_len","*","max_token_count","]","seq_token_count",":","shape","[","batch_size","*","max_seq_len","]","Return",":","embedding",":","shape","(","batch_size","*","max_seq_len","*","output_dim",")"]
code: def forward(self, seq_token_idx, seq_token_count):
      """
      Args:
          seq_token_idx : shape [batch_size * max_seq_len * max_token_count]
          seq_token_count : shape [batch_size * max_seq_len]
      Return:
          embedding : shape (batch_size * max_seq_len * output_dim)
      """
      # batch_size * max_seq_len * max_token_count * emb_dim
      seq_token_emb = self.word_embedding(seq_token_idx)
      # transpose to  max_seq_len * batch_size * max_token_count * emb_dim
      seq_token_emb_t = seq_token_emb.transpose(0, 1)
      # transpose to  max_seq_len * batch_size
      seq_token_count_t = seq_token_count.transpose(0, 1)
  
      outputs = []
      for i, token_emb in enumerate(seq_token_emb_t):
          token_count = seq_token_count_t[i]
          rep, (h_t, c_t) = self.lstm(token_emb, token_count)
          h_t_transposed = h_t.transpose(0, 1).view(
              self.lstm.config.num_layers,
              self.num_lstm_directions,
              -1,
              self.lstm.config.lstm_dim,
          )
          if self.lstm.config.bidirectional:
              # Concat the two directions of the last layer
              output = torch.cat(
                  [h_t_transposed[-1][0], h_t_transposed[-1][1]], 1
              )
          else:
              output = h_t_transposed[-1][0]
          # seq_len * batch_size * lstm_dim
          outputs.append(output)
      # batch_size * seq_len * lstm_dim
      return torch.stack(outputs).transpose(1, 0)
  
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 4 for calling the WordSeqEmbedding obj's underlying member method code with example usage: obj.forward(seq_token_idx, seq_token_count) and returns: torch