class_docstr: Sequence-to-sequence dynamic model with GNMT attention architecture
  with sparsity policy support.
class_docstr_tok: ["Sequence-to-sequence","dynamic","model","with","GNMT","attention","architecture","with","sparsity","policy","support","."]
code: def _get_infer_summary(self, hparams):
      if hparams.infer_mode == "beam_search":
          return tf.no_op()
      elif self.is_gnmt_attention:
          return attention_model._create_attention_images_summary(
              self.final_context_state[0]
          )
      else:
          return super(GNMTModel, self)._get_infer_summary(hparams)
  
file_path: nlp-architect/examples/sparse_gnmt/gnmt_model.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from .gnmt import attention_model
  from .gnmt import model_helper
  from .gnmt.utils import misc_utils
label_desc: Use image node_id 6 for calling the GNMTModel obj's underlying member method code with example usage: obj._get_infer_summary(hparams) and returns: tf, attention_model, super