class_docstr: Attention net.  See file docstring.
class_docstr_tok: ["Attention","net",".","See","file","docstring","."]
docstr: Predict.
docstr_tok: ["Predict","."]
code: def infer(
      self,
      features=None,
      decode_length=1,
      beam_size=1,
      top_beams=1,
      alpha=0.0,
      use_tpu=False,
  ):
      """Predict."""
      features["targets"] = tf.identity(features["inputs"])
      logits, _ = self(features)
      log_probs = common_layers.log_prob_from_logits(logits)
      predictions, scores = common_layers.argmax_with_score(log_probs)
      return {
          "outputs": predictions,
          "scores": scores,
      }
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import expert_utils
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 3 for calling the Aligned obj's underlying member method code with example usage: obj.infer(features, decode_length, beam_size, top_beams, alpha, use_tpu) and returns: dict