tensorflow/tensorrt

How to evaluate overall model accuracy of TF_TRT FP32, FP16 and FP08 based image classifier?

smbash2022 opened this issue · 0 comments

Hello

I converted my binary image classification model from Keras-TFv2 to TF-TRT by following NVIDIA colab.

https://github.com/tensorflow/tensorrt/blob/master/tftrt/examples/image_classification/NGC-TFv2-TF-TRT-inference-from-Keras-saved-model.ipynb
https://www.youtube.com/watch?v=O-_K42EAlP0

For my TFv2 model, I have evaluated the overall classification accuracy of my model on test images by
results = model.evaluate(test_images, verbose=0)
print(" Loss: {:.5f}".format(results[0]))
print("Accuracy: {:.3f}%".format(results[1] * 100))

My TFv2 based image classification model accuracy is 95.47%.
I also have to find the TF_TRT32, TRT16 and TRT08 models' overall accuracy.
However, I am unable to find the overall accuracy of my TRT32, TRT16 and TRT08 based image classification models.

Because, I could not find a solution or function (like model.evaluate()) for TF_TRT32, 16 and 08 models.
Therefore, I need help to know how can I evaluate the overall accuracy of TRT32, TRT16 and TRT08 based image classification models?

Thank You