class_docstr: Combined Self attention both on image and question.
class_docstr_tok: ["Combined","Self","attention","both","on","image","and","question","."]
code: def body(self, features):
      hp = self.hparams
      # pylint: disable=eval-used
      if hp.image_input_type == "image":
          image_feat = vqa_layers.image_embedding(
              features["inputs"],
              model_fn=eval(hp.image_model_fn),
              trainable=hp.train_resnet,
              is_training=hp.mode == tf_estimator.ModeKeys.TRAIN,
          )
      else:
          image_feat = features["inputs"]
  
      image_feat = common_layers.flatten4d3d(image_feat)
      image_hidden_size = hp.hidden_size
      image_feat = common_layers.dense(image_feat, image_hidden_size)
      utils.collect_named_outputs(
          "norms", "image_feat_after_proj", tf.norm(image_feat, axis=-1)
      )
  
      question = common_layers.flatten4d3d(features["question"])
      utils.collect_named_outputs(
          "norms", "question_embedding", tf.norm(question, axis=-1)
      )
      (
          encoder_input,
          encoder_self_attention_bias,
          encoder_decoder_attention_bias,
      ) = prepare_image_question_encoder(image_feat, question, hp)
      encoder_input = tf.nn.dropout(
          encoder_input, keep_prob=1.0 - hp.layer_prepostprocess_dropout
      )
  
      # scale query by sqrt(hidden_size)
      query = (
          tf.get_variable("query", [hp.hidden_size])
          * hp.hidden_size**0.5
      )
      query = tf.expand_dims(tf.expand_dims(query, axis=0), axis=0)
      batch_size = common_layers.shape_list(encoder_input)[0]
      query = tf.tile(query, [batch_size, 1, 1])
      query = tf.nn.dropout(
          query, keep_prob=1.0 - hp.layer_prepostprocess_dropout
      )
  
      decoder_output = iterative_encoder_decoder(
          encoder_input,
          encoder_self_attention_bias,
          encoder_decoder_attention_bias,
          query,
          hp,
      )
  
      utils.collect_named_outputs(
          "norms", "decoder_output", tf.norm(decoder_output, axis=-1)
      )
  
      norm_tensors = utils.convert_collection_to_dict("norms")
      vqa_layers.summarize_tensors(norm_tensors, tag="norms/")
  
      # Expand dimension 1 and 2
      return tf.expand_dims(decoder_output, axis=1)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from six.moves import range
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import vqa_layers
  from tensor2tensor.models.research import vqa_attention
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  from tensorflow.contrib.layers.python.layers import utils
label_desc: Use image node_id 1 for calling the VqaIterativeCombinedSelfAttention obj's underlying member method code with example usage: obj.body(features) and returns: tf