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 __init__(
      self,
      hparams,
      mode,
      iterator,
      source_vocab_table,
      target_vocab_table,
      reverse_target_vocab_table=None,
      scope=None,
      extra_args=None,
  ):
      self.is_gnmt_attention = hparams.attention_architecture in [
          "gnmt",
          "gnmt_v2",
      ]
  
      super(GNMTModel, self).__init__(
          hparams=hparams,
          mode=mode,
          iterator=iterator,
          source_vocab_table=source_vocab_table,
          target_vocab_table=target_vocab_table,
          reverse_target_vocab_table=reverse_target_vocab_table,
          scope=scope,
          extra_args=extra_args,
      )
  
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 1 to create a new GNMTModel object from inherited base classes: attention_model with example: obj = GNMTModel(hparams, mode, iterator, source_vocab_table, target_vocab_table, reverse_target_vocab_table, scope, extra_args)