class_docstr: `StackedBidirectionalRNN` implements a multi-layer bidirectional RNN with an
  option to return outputs from all the layers of RNN.
  
  Args:
      config (Config): Configuration object of type BiLSTM.Config.
      embed_dim (int): The number of expected features in the input.
      padding_value (float): Value for the padded elements. Defaults to 0.0.
  
  Attributes:
      padding_value (float): Value for the padded elements.
      dropout (nn.Dropout): Dropout layer preceding the LSTM.
      lstm (nn.LSTM): LSTM layer that operates on the inputs.
      representation_dim (int): The calculated dimension of the output features
          of BiLSTM.
class_docstr_tok: ["`","StackedBidirectionalRNN","`","implements","a","multi-layer","bidirectional","RNN","with","an","option","to","return","outputs","from","all","the","layers","of","RNN",".","Args",":","config","(","Config",")",":","Configuration","object","of","type","BiLSTM.Config",".","embed_dim","(","int",")",":","The","number","of","expected","features","in","the","input",".","padding_value","(","float",")",":","Value","for","the","padded","elements",".","Defaults","to","0.0",".","Attributes",":","padding_value","(","float",")",":","Value","for","the","padded","elements",".","dropout","(","nn.Dropout",")",":","Dropout","layer","preceding","the","LSTM",".","lstm","(","nn.LSTM",")",":","LSTM","layer","that","operates","on","the","inputs",".","representation_dim","(","int",")",":","The","calculated","dimension","of","the","output","features","of","BiLSTM","."]
code: def __init__(
      self, config: Config, input_size: int, padding_value: float = 0.0
  ):
      super().__init__()
      self.num_layers = config.num_layers
      self.dropout = nn.Dropout(config.dropout)
      self.concat_layers = config.concat_layers
      self.padding_value = padding_value
      self.rnns = nn.ModuleList()
  
      rnn_module = RNN_TYPE_DICT.get(config.rnn_type)
      assert rnn_module is not None, "rnn_cell cannot be None"
      for i in range(config.num_layers):
          input_size = input_size if i == 0 else 2 * config.hidden_size
          self.rnns.append(
              rnn_module(
                  input_size,
                  config.hidden_size,
                  num_layers=1,
                  bidirectional=config.bidirectional,
              )
          )
      self.representation_dim = (
          (config.num_layers if config.concat_layers else 1)
          * config.hidden_size
          * (2 if config.bidirectional else 1)
      )
      log_class_usage(__class__)
  
file_path: pytext/pytext/models/representations/stacked_bidirectional_rnn.py
imports: from enum import Enum
  import torch
  import torch.nn
  from pytext.models.module import Module
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 1 to create a new StackedBidirectionalRNN object from inherited base classes: Module with example: obj = StackedBidirectionalRNN(config, input_size, padding_value)