class_docstr: Tests the `AttentionDecoder` class.
    
class_docstr_tok: ["Tests","the","`","AttentionDecoder","`","class","."]
code: def create_decoder(self, helper, mode):
      attention_fn = AttentionLayerDot(
          params={"num_units": self.attention_dim},
          mode=tf.contrib.learn.ModeKeys.TRAIN,
      )
      attention_values = tf.convert_to_tensor(
          np.random.randn(self.batch_size, self.input_seq_len, 32),
          dtype=tf.float32,
      )
      attention_keys = tf.convert_to_tensor(
          np.random.randn(self.batch_size, self.input_seq_len, 32),
          dtype=tf.float32,
      )
      params = AttentionDecoder.default_params()
      params["max_decode_length"] = self.max_decode_length
      return AttentionDecoder(
          params=params,
          mode=mode,
          vocab_size=self.vocab_size,
          attention_keys=attention_keys,
          attention_values=attention_values,
          attention_values_length=np.arange(self.batch_size) + 1,
          attention_fn=attention_fn,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import tensorflow
  import numpy
  from seq2seq.decoders import BasicDecoder, AttentionDecoder, AttentionLayerDot
  from seq2seq.decoders import beam_search_decoder
  from seq2seq.inference import beam_search
  from seq2seq.contrib.seq2seq import helper
label_desc: Use image node_id 2 for calling the AttentionDecoderTest obj's underlying member method code with example usage: obj.create_decoder(helper, mode) and returns: AttentionDecoder