class_docstr: A bidirectional RNN encoder. Uses the same cell for both the
  forward and backward RNN. Stacking should be performed as part of
  the cell.
  
  Args:
    cell: An instance of tf.contrib.rnn.RNNCell
    name: A name for the encoder
class_docstr_tok: ["A","bidirectional","RNN","encoder",".","Uses","the","same","cell","for","both","the","forward","and","backward","RNN",".","Stacking","should","be","performed","as","part","of","the","cell",".","Args",":","cell",":","An","instance","of","tf.contrib.rnn.RNNCell","name",":","A","name","for","the","encoder"]
code: def encode(self, inputs, sequence_length, **kwargs):
      scope = tf.get_variable_scope()
      scope.set_initializer(
          tf.random_uniform_initializer(
              -self.params["init_scale"], self.params["init_scale"]
          )
      )
  
      cell_fw = training_utils.get_rnn_cell(**self.params["rnn_cell"])
      cell_bw = training_utils.get_rnn_cell(**self.params["rnn_cell"])
      outputs, states = tf.nn.bidirectional_dynamic_rnn(
          cell_fw=cell_fw,
          cell_bw=cell_bw,
          inputs=inputs,
          sequence_length=sequence_length,
          dtype=tf.float32,
          **kwargs,
      )
  
      # Concatenate outputs and states of the forward and backward RNNs
      outputs_concat = tf.concat(outputs, 2)
  
      return EncoderOutput(
          outputs=outputs_concat,
          final_state=states,
          attention_values=outputs_concat,
          attention_values_length=sequence_length,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import tensorflow
  from tensorflow.contrib.rnn.python.ops import rnn
  from seq2seq.encoders.encoder import Encoder, EncoderOutput
  from seq2seq.training import utils
label_desc: Use image node_id 3 for calling the BidirectionalRNNEncoder obj's underlying member method code with example usage: obj.encode(inputs, sequence_length) and returns: EncoderOutput