class_docstr: `AugmentedLSTM` implements a generic AugmentedLSTM representation layer.
  AugmentedLSTM is an LSTM which optionally appends
  an optional highway network to the output layer.
  Furthermore the dropout controlls the level of variational dropout done.
  
  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.
      forward_layers (nn.ModuleList): A module list of unidirectional AugmentedLSTM
          layers moving forward in time.
      backward_layers (nn.ModuleList): A module list of unidirectional AugmentedLSTM
          layers moving backward in time.
      representation_dim (int): The calculated dimension of the output features
          of AugmentedLSTM.
class_docstr_tok: ["`","AugmentedLSTM","`","implements","a","generic","AugmentedLSTM","representation","layer",".","AugmentedLSTM","is","an","LSTM","which","optionally","appends","an","optional","highway","network","to","the","output","layer",".","Furthermore","the","dropout","controlls","the","level","of","variational","dropout","done",".","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",".","forward_layers","(","nn.ModuleList",")",":","A","module","list","of","unidirectional","AugmentedLSTM","layers","moving","forward","in","time",".","backward_layers","(","nn.ModuleList",")",":","A","module","list","of","unidirectional","AugmentedLSTM","layers","moving","backward","in","time",".","representation_dim","(","int",")",":","The","calculated","dimension","of","the","output","features","of","AugmentedLSTM","."]
code: def __init__(
      self, config: Config, embed_dim: int, padding_value: float = 0.0
  ) -> None:
      super().__init__(config)
  
      self.config = config
      self.embed_dim = embed_dim
      self.padding_value = padding_value
      self.lstm_dim = self.config.lstm_dim
      self.num_layers = self.config.num_layers
      self.bidirectional = self.config.bidirectional
      self.dropout = self.config.dropout
      self.use_highway = self.config.use_highway
      self.use_bias = self.config.use_bias
  
      num_directions = int(self.bidirectional) + 1
      self.forward_layers = nn.ModuleList()
      if self.bidirectional:
          self.backward_layers = nn.ModuleList()
  
      lstm_embed_dim = embed_dim
      for _ in range(self.num_layers):
          self.forward_layers.append(
              AugmentedLSTMUnidirectional(
                  lstm_embed_dim,
                  self.lstm_dim,
                  go_forward=True,
                  recurrent_dropout_probability=self.dropout,
                  use_highway=self.use_highway,
                  use_input_projection_bias=self.use_bias,
              )
          )
          if self.bidirectional:
              self.backward_layers.append(
                  AugmentedLSTMUnidirectional(
                      lstm_embed_dim,
                      self.lstm_dim,
                      go_forward=False,
                      recurrent_dropout_probability=self.dropout,
                      use_highway=self.use_highway,
                      use_input_projection_bias=self.use_bias,
                  )
              )
  
          lstm_embed_dim = self.lstm_dim * num_directions
      self.representation_dim = lstm_embed_dim
      log_class_usage(__class__)
  
imports: import math
  from typing import Optional, Tuple
  import torch
  import torch.nn
  from pytext.config import ConfigBase
  from pytext.utils.usage import log_class_usage
  from torch.nn.utils.rnn import pack_padded_sequence, PackedSequence, pad_packed_sequence
  from .representation_base import RepresentationBase
label_desc: Use image node_id 1 to create a new AugmentedLSTM object from inherited base classes: RepresentationBase with example: obj = AugmentedLSTM(config, embed_dim, padding_value)