class_docstr: Attention net.  See file docstring.
class_docstr_tok: ["Attention","net",".","See","file","docstring","."]
docstr: Fast version of greedy decoding.
  
  Args:
    features: an map of string to `Tensor`
    decode_length: an integer.  How many additional timesteps to decode.
    use_tpu: A bool. Whether to build the inference graph for TPU.
  
  Returns:
    A dict of decoding results {
        "outputs": integer `Tensor` of decoded ids of shape
            [batch_size, <= decode_length] if beam_size == 1 or
            [batch_size, top_beams, <= decode_length]
        "scores": decoding log probs from the beam search,
            None if using greedy decoding (beam_size=1)
    }
  
  Raises:
    NotImplementedError: If there are multiple data shards.
docstr_tok: ["Fast","version","of","greedy","decoding",".","Args",":","features",":","an","map","of","string","to","`","Tensor","`","decode_length",":","an","integer",".","How","many","additional","timesteps","to","decode",".","use_tpu",":","A","bool",".","Whether","to","build","the","inference","graph","for","TPU",".","Returns",":","A","dict","of","decoding","results","{","``","outputs","''",":","integer","`","Tensor","`","of","decoded","ids","of","shape","[","batch_size",",","<","=","decode_length","]","if","beam_size","==","1","or","[","batch_size",",","top_beams",",","<","=","decode_length","]","``","scores","''",":","decoding","log","probs","from","the","beam","search",",","None","if","using","greedy","decoding","(","beam_size=1",")","}","Raises",":","NotImplementedError",":","If","there","are","multiple","data","shards","."]
code: def _greedy_infer(self, features, decode_length, use_tpu=False):
      """Fast version of greedy decoding.
  
      Args:
        features: an map of string to `Tensor`
        decode_length: an integer.  How many additional timesteps to decode.
        use_tpu: A bool. Whether to build the inference graph for TPU.
  
      Returns:
        A dict of decoding results {
            "outputs": integer `Tensor` of decoded ids of shape
                [batch_size, <= decode_length] if beam_size == 1 or
                [batch_size, top_beams, <= decode_length]
            "scores": decoding log probs from the beam search,
                None if using greedy decoding (beam_size=1)
        }
  
      Raises:
        NotImplementedError: If there are multiple data shards.
      """
      return super(transformer.Transformer, self)._greedy_infer(
          features, decode_length
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 8 for calling the NeuralAssistant obj's underlying member method code with example usage: obj._greedy_infer(features, decode_length, use_tpu) and returns: super