class_docstr: RNN encoder using nn.LSTM for cuDNN support / ONNX exportability.
class_docstr_tok: ["RNN","encoder","using","nn.LSTM","for","cuDNN","support","\/","ONNX","exportability","."]
code: def __init__(
      self,
      embed_dim,
      hidden_dim,
      num_layers,
      dropout_in,
      dropout_out,
      bidirectional,
  ):
      super().__init__()
      self.dropout_in = dropout_in
      self.dropout_out = dropout_out
      self.hidden_dim = hidden_dim
      self.bidirectional = bidirectional
      self.num_layers: int = num_layers
  
      self.word_dim = embed_dim
  
      self.bilstm = BiLSTM(
          num_layers=num_layers,
          bidirectional=bidirectional,
          embed_dim=embed_dim,
          hidden_dim=hidden_dim,
          dropout=dropout_out,
      )
      log_class_usage(__class__)
  
file_path: pytext/pytext/models/seq_models/rnn_encoder.py
imports: from typing import Dict, List, Tuple
  import torch
  import torch.nn.functional
  from pytext.config import ConfigBase
  from pytext.utils.usage import log_class_usage
  from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
  from .base import PyTextSeq2SeqModule
label_desc: Use image node_id 1 to create a new LSTMSequenceEncoder object from inherited base classes: PyTextSeq2SeqModule with example: obj = LSTMSequenceEncoder(embed_dim, hidden_dim, num_layers, dropout_in, dropout_out, bidirectional)