def output_tensor(interpreter, i):
  """Gets a model's ith output tensor.

  Args:
    interpreter: The ``tf.lite.Interpreter`` holding the model.
    i (int): The index position of an output tensor.
  Returns:
    The output tensor at the specified position.
  """
  return interpreter.tensor(interpreter.get_output_details()[i]['index'])()