In [16]:
image_batch, label_batch = next(iter(validation_generator))
In [17]:
interpreter.set_tensor(input_details[0]['index'], image_batch)
In [18]:
interpreter.invoke()
In [19]:
tflite_results = interpreter.get_tensor(output_details[0]['index'])

tf_results = model.predict(image_batch)

for tf_result, tflite_result in zip(tf_results, tflite_results):
    np.testing.assert_almost_equal(tf_result, tflite_result, decimal=5)