class_docstr: Universal Transformer: Depth-wise recurrent transformer model.
class_docstr_tok: ["Universal","Transformer",":","Depth-wise","recurrent","transformer","model","."]
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: bool, whether to use the TPU codepath.
  
  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",":","bool",",","whether","to","use","the","TPU","codepath",".","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: bool, whether to use the TPU codepath.
  
      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.
      """
      if use_tpu:
          return self._slow_greedy_infer_tpu(features, decode_length)
      return self._slow_greedy_infer(features, decode_length)
  
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_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.models.research import universal_transformer_util
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the UniversalTransformer obj's underlying member method code with example usage: obj._greedy_infer(features, decode_length, use_tpu) and returns: self, self