docstr: Creates model for greedy inference testing.
  
  Returns:
    model: A t2t model.
    features: An map of string to tensor.
docstr_tok: ["Creates","model","for","greedy","inference","testing",".","Returns",":","model",":","A","t2t","model",".","features",":","An","map","of","string","to","tensor","."]
code: def _create_greedy_infer_model(self):
      """Creates model for greedy inference testing.
  
      Returns:
        model: A t2t model.
        features: An map of string to tensor.
      """
      model, features = get_model(transformer.transformer_small())
  
      out_logits, _ = model(features)
      out_logits = tf.squeeze(out_logits, axis=[2, 3])
      loss = tf.nn.sparse_softmax_cross_entropy_with_logits(
          logits=tf.reshape(out_logits, [-1, VOCAB_SIZE]),
          labels=tf.reshape(features["targets"], [-1]),
      )
      loss = tf.reduce_mean(loss)
      apply_grad = tf.train.AdamOptimizer(0.001).minimize(loss)
  
      with self.test_session():
          tf.global_variables_initializer().run()
          for _ in range(100):
              apply_grad.run()
  
      model.set_mode(tf_estimator.ModeKeys.PREDICT)
  
      return model, features
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators import librispeech
  from tensor2tensor.data_generators import problem_hparams
  from tensor2tensor.models import transformer
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 13 for calling the TransformerTest obj's underlying member method code with example usage: obj._create_greedy_infer_model() and returns: model,  features