class_docstr: Sequence-to-sequence dynamic model with attention.
  
  This class implements a multi-layer recurrent neural network as encoder,
  and an attention-based decoder. This is the same as the model described in
  (Luong et al., EMNLP'2015) paper: https://arxiv.org/pdf/1508.04025v5.pdf.
  This class also allows to use GRU cells in addition to LSTM cells with
  support for dropout.
code: def _prepare_beam_search_decoder_inputs(
      self, beam_width, memory, source_sequence_length, encoder_state
  ):
      memory = tf.contrib.seq2seq.tile_batch(
          memory, multiplier=beam_width
      )
      source_sequence_length = tf.contrib.seq2seq.tile_batch(
          source_sequence_length, multiplier=beam_width
      )
      encoder_state = tf.contrib.seq2seq.tile_batch(
          encoder_state, multiplier=beam_width
      )
      batch_size = self.batch_size * beam_width
      return memory, source_sequence_length, encoder_state, batch_size
  
file_path: nlp-architect/examples/sparse_gnmt/gnmt/attention_model.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from .None import model
  from .None import model_helper
label_desc: Use image node_id 2 for calling the AttentionModel obj's underlying member method code with example usage: obj._prepare_beam_search_decoder_inputs(beam_width, memory, source_sequence_length, encoder_state) and returns: memory,  source_sequence_length,  encoder_state,  batch_size