class_docstr: Attention net.  See file docstring.
class_docstr_tok: ["Attention","net",".","See","file","docstring","."]
code: def body(self, features):
      # Remove dropout if not training
      hparams = self._hparams
      targets = features["targets"]
      targets = tf.squeeze(targets, 2)
  
      (
          decoder_input,
          decoder_self_attention_bias,
      ) = attention_lm_prepare_decoder(targets, hparams)
  
      decoder_input = tf.nn.dropout(
          decoder_input, 1.0 - hparams.layer_prepostprocess_dropout
      )
      decoder_output = attention_lm_decoder(
          decoder_input, decoder_self_attention_bias, hparams
      )
      decoder_output = tf.expand_dims(decoder_output, 2)
  
      return decoder_output
  
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.utils import contrib
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the AttentionLM obj's underlying member method code with example usage: obj.body(features) and returns: decoder_output