class_docstr: An RNN Decoder that uses attention over an input sequence.
  
  Args:
    cell: An instance of ` tf.contrib.rnn.RNNCell`
    helper: An instance of `tf.contrib.seq2seq.Helper` to assist decoding
    initial_state: A tensor or tuple of tensors used as the initial cell
      state.
    vocab_size: Output vocabulary size, i.e. number of units
      in the softmax layer
    attention_keys: The sequence used to calculate attention scores.
      A tensor of shape `[B, T, ...]`.
    attention_values: The sequence to attend over.
      A tensor of shape `[B, T, input_dim]`.
    attention_values_length: Sequence length of the attention values.
      An int32 Tensor of shape `[B]`.
    attention_fn: The attention function to use. This function map from
      `(state, inputs)` to `(attention_scores, attention_context)`.
      For an example, see `seq2seq.decoder.attention.AttentionLayer`.
    reverse_scores: Optional, an array of sequence length. If set,
      reverse the attention scores in the output. This is used for when
      a reversed source sequence is fed as an input but you want to
      return the scores in non-reversed order.
class_docstr_tok: ["An","RNN","Decoder","that","uses","attention","over","an","input","sequence",".","Args",":","cell",":","An","instance","of","`","tf.contrib.rnn.RNNCell","`","helper",":","An","instance","of","`","tf.contrib.seq2seq.Helper","`","to","assist","decoding","initial_state",":","A","tensor","or","tuple","of","tensors","used","as","the","initial","cell","state",".","vocab_size",":","Output","vocabulary","size",",","i.e",".","number","of","units","in","the","softmax","layer","attention_keys",":","The","sequence","used","to","calculate","attention","scores",".","A","tensor","of","shape","`","[","B",",","T",",","...","]","`",".","attention_values",":","The","sequence","to","attend","over",".","A","tensor","of","shape","`","[","B",",","T",",","input_dim","]","`",".","attention_values_length",":","Sequence","length","of","the","attention","values",".","An","int32","Tensor","of","shape","`","[","B","]","`",".","attention_fn",":","The","attention","function","to","use",".","This","function","map","from","`","(","state",",","inputs",")","`","to","`","(","attention_scores",",","attention_context",")","`",".","For","an","example",",","see","`","seq2seq.decoder.attention.AttentionLayer","`",".","reverse_scores",":","Optional",",","an","array","of","sequence","length",".","If","set",",","reverse","the","attention","scores","in","the","output",".","This","is","used","for","when","a","reversed","source","sequence","is","fed","as","an","input","but","you","want","to","return","the","scores","in","non-reversed","order","."]
code: def output_size(self):
      return AttentionDecoderOutput(
          logits=self.vocab_size,
          predicted_ids=tf.TensorShape([]),
          cell_output=self.cell.output_size,
          attention_scores=tf.shape(self.attention_values)[1:-1],
          attention_context=self.attention_values.get_shape()[-1],
      )
  
file_path: seq2seq/seq2seq/decoders/attention_decoder.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from collections import namedtuple
  import tensorflow
  from seq2seq.decoders.rnn_decoder import RNNDecoder
  from seq2seq.contrib.seq2seq.helper import CustomHelper
label_desc: Use image node_id 2 for calling the AttentionDecoder obj's underlying member method code with example usage: obj.output_size() and returns: AttentionDecoderOutput