class_docstr: An LSTM with Recurrent Dropout and the option to use highway
  connections between layers. Note: this implementation is slower
  than the native Pytorch LSTM because it cannot make use of CUDNN
  optimizations for stacked RNNs due to the highway layers and
  variational dropout.
  
  Parameters
  ----------
  input_size : int, required.
      The dimension of the inputs to the LSTM.
  hidden_size : int, required.
      The dimension of the outputs of the LSTM.
  go_forward: bool, optional (default = True)
      The direction in which the LSTM is applied to the sequence.
      Forwards by default, or backwards if False.
  recurrent_dropout_probability: float, optional (default = 0.0)
      The dropout probability to be used in a dropout scheme as stated in
      `A Theoretically Grounded Application of Dropout in Recurrent Neural Networks
      <https://arxiv.org/abs/1512.05287>`_ . Implementation wise, this simply
      applies a fixed dropout mask per sequence to the recurrent connection of the
      LSTM.
  use_highway: bool, optional (default = True)
      Whether or not to use highway connections between layers. This effectively involves
      reparameterising the normal output of an LSTM as::
  
          gate = sigmoid(W_x1 * x_t + W_h * h_t)
          output = gate * h_t  + (1 - gate) * (W_x2 * x_t)
  use_input_projection_bias : bool, optional (default = True)
      Whether or not to use a bias on the input projection layer. This is mainly here
      for backwards compatibility reasons and will be removed (and set to False)
      in future releases.
  
  Returns
  -------
  output_accumulator : PackedSequence
      The outputs of the LSTM for each timestep. A tensor of shape
      (batch_size, max_timesteps, hidden_size) where for a given batch
      element, all outputs past the sequence length for that batch are
      zero tensors.
code: def reset_parameters(self):
      # Use sensible default initializations for parameters.
      block_orthogonal(
          self.input_linearity.weight.data,
          [self.hidden_size, self.input_size],
      )
      block_orthogonal(
          self.state_linearity.weight.data,
          [self.hidden_size, self.hidden_size],
      )
  
      self.state_linearity.bias.data.fill_(0.0)
      # Initialize forget gate biases to 1.0 as per An Empirical
      # Exploration of Recurrent Network Architectures, (Jozefowicz, 2015).
      self.state_linearity.bias.data[
          self.hidden_size : 2 * self.hidden_size
      ].fill_(1.0)
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/augmented_lstm.py
imports: from __future__ import absolute_import
  import torch
  from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence, PackedSequence
  from allennlp.common.checks import ConfigurationError
  from allennlp.nn.util import get_dropout_mask
  from allennlp.nn.initializers import block_orthogonal
label_desc: Use image node_id 2 for calling the AugmentedLstm obj's underlying member method code with example usage: obj.reset_parameters() without return types