class_docstr: A MultiCell with GNMT attention style.
class_docstr_tok: ["A","MultiCell","with","GNMT","attention","style","."]
docstr: Run the cell with bottom layer's attention copied to all upper layers.
docstr_tok: ["Run","the","cell","with","bottom","layer","'s","attention","copied","to","all","upper","layers","."]
code: def __call__(self, inputs, state, scope=None):
      """Run the cell with bottom layer's attention copied to all upper layers."""
      if not tf.contrib.framework.nest.is_sequence(state):
          raise ValueError(
              "Expected state to be a tuple of length %d, but received: %s"
              % (len(self.state_size), state)
          )
  
      with tf.variable_scope(scope or "multi_rnn_cell"):
          new_states = []
  
          with tf.variable_scope("cell_0_attention"):
              attention_cell = self._cells[0]
              attention_state = state[0]
              cur_inp, new_attention_state = attention_cell(
                  inputs, attention_state
              )
              new_states.append(new_attention_state)
  
          for i in range(1, len(self._cells)):
              with tf.variable_scope("cell_%d" % i):
                  cell = self._cells[i]
                  cur_state = state[i]
  
                  if self.use_new_attention:
                      cur_inp = tf.concat(
                          [cur_inp, new_attention_state.attention], -1
                      )
                  else:
                      cur_inp = tf.concat(
                          [cur_inp, attention_state.attention], -1
                      )
  
                  cur_inp, new_state = cell(cur_inp, cur_state)
                  new_states.append(new_state)
  
      return cur_inp, tuple(new_states)
  
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 2 for calling the GNMTAttentionMultiCell obj's underlying member method code with example usage: obj.__call__(inputs, state, scope) and returns: cur_inp,  tuple