class_docstr: Base test class for TensorFlow Lite 2.x model tests.
class_docstr_tok: ["Base","test","class","for","TensorFlow","Lite","2.x","model","tests","."]
docstr: Evaluates the model on the `input_data`.
  
  Args:
    tflite_model: TensorFlow Lite model.
    input_data: List of EagerTensor const ops containing the input data for
      each input tensor.
    input_shapes: List of tuples representing the `shape_signature` and the
      new shape of each input tensor that has unknown dimensions.
  
  Returns:
    [np.ndarray]
docstr_tok: ["Evaluates","the","model","on","the","`","input_data","`",".","Args",":","tflite_model",":","TensorFlow","Lite","model",".","input_data",":","List","of","EagerTensor","const","ops","containing","the","input","data","for","each","input","tensor",".","input_shapes",":","List","of","tuples","representing","the","`","shape_signature","`","and","the","new","shape","of","each","input","tensor","that","has","unknown","dimensions",".","Returns",":","[","np.ndarray","]"]
code: def _evaluateTFLiteModel(
      self, tflite_model, input_data, input_shapes=None
  ):
      """Evaluates the model on the `input_data`.
  
      Args:
        tflite_model: TensorFlow Lite model.
        input_data: List of EagerTensor const ops containing the input data for
          each input tensor.
        input_shapes: List of tuples representing the `shape_signature` and the
          new shape of each input tensor that has unknown dimensions.
  
      Returns:
        [np.ndarray]
      """
      interpreter = Interpreter(model_content=tflite_model)
      input_details = interpreter.get_input_details()
      if input_shapes:
          for idx, (shape_signature, final_shape) in enumerate(
              input_shapes
          ):
              self.assertTrue(
                  (
                      input_details[idx]["shape_signature"]
                      == shape_signature
                  ).all()
              )
              index = input_details[idx]["index"]
              interpreter.resize_tensor_input(
                  index, final_shape, strict=True
              )
      interpreter.allocate_tensors()
  
      output_details = interpreter.get_output_details()
      input_details = interpreter.get_input_details()
  
      for input_tensor, tensor_data in zip(input_details, input_data):
          interpreter.set_tensor(
              input_tensor["index"], tensor_data.numpy()
          )
      interpreter.invoke()
      return [
          interpreter.get_tensor(details["index"])
          for details in output_details
      ]
  
imports: import os
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow.lite.python.interpreter import Interpreter
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.trackable import autotrackable
label_desc: Use image node_id 1 for calling the ModelTest obj's underlying member method code with example usage: obj._evaluateTFLiteModel(tflite_model, input_data, input_shapes) and returns: unknown