def apply_lstm(x, seq_len):
  """Run a bi-directional LSTM over the `x`.

  Args:
    x: <tf.float32>[batch, seq_len, dim]
    seq_len: <tf.int32>[batch] for None, sequence lengths of `seq2`

  Returns:
    out, <tf.float32>[batch, seq_len, out_dim]
  """
  return cudnn_layers.stacked_bilstm(
      input_emb=x,
      input_len=seq_len,
      hidden_size=FLAGS.lstm_dim,
      num_layers=1,
      dropout_ratio=0.0,
      mode=tf_estimator.ModeKeys.TRAIN,
      use_cudnn=None)
Run a bi-directional LSTM over the `x`.

  Args:
    x: <tf.float32>[batch, seq_len, dim]
    seq_len: <tf.int32>[batch] for None, sequence lengths of `seq2`

  Returns:
    out, <tf.float32>[batch, seq_len, out_dim]
  
language/boolq/run_recurrent_model_boolq.py