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 _get_infer_summary(self, hparams):
      if not self.has_attention or hparams.infer_mode == "beam_search":
          return tf.no_op()
      return _create_attention_images_summary(self.final_context_state)
  
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 4 for calling the AttentionModel obj's underlying member method code with example usage: obj._get_infer_summary(hparams) and returns: _create_attention_images_summary, tf