Hello,
I’m using:

python 2.5.3
tensorflow 2.3.0

What error am I making?
Thanks!
import tensorflow as tf
import numpy as np
import cv2
from PIL import Image

interpreter = tf.lite.Interpreter(model_path="mobilenet_v1_1.0_224_quant.tflite", num_threads=None)
#model_path="model.tflite", num_threads=None)

interpreter.allocate_tensors()

input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()


input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()

# check the type of the input tensor
floating_model = input_details[0]['dtype'] == np.float32
  
# NxHxWxC, H:1, W:2
height = input_details[0]['shape'][1]
width = input_details[0]['shape'][2]
img = Image.open("test.jpg").resize((width, height))
# add N dim
input_data = np.expand_dims(img, axis=0)
if floating_model:
  input_data = (np.float32(input_data) - 127.5) / 127.5

interpreter.set_tensor(input_details[0]['index'], input_data)

interpreter.invoke()

print(interpreter.get_tensor(output_details[0]['index']))
print(interpreter.get_tensor(output_details[1]['index']))
print(interpreter.get_tensor(output_details[2]['index']))
print(interpreter.get_tensor(output_details[3]['index']))
Error:
print(interpreter.get_tensor(output_details[1][‘index’]))
IndexError: list index out of range