Using TRT engine as feature extractor has better results than using original model.

Hello All,
I hope this is the right place to ask this question.
I have a model in Caffe that I use it as a feature extractor and use those feature vectors(saved in a npy file) as an input to another classifier.
I have two versions of my feature extractor: one is the original Caffe model and the second is the TensorRT engine created from the original Caffe model.

Now when I train new classifier with the features extracted from Caffe model I get 80% on testset then I use TensorRT engine to extract same features to train same classifier with same config and I get 90% accuracy on my testset.

I would appreciate it if someone can explain how and why I get surprisingly better results when I use TensorRT version of same feature extractor model.


As per my understanding, TensorRT optimizes the network by combining layers and optimizing kernel selection for improved latency, throughput, power efficiency, and memory consumption.

Not sure how it’s improving the accuracy in this case.

Could you please share the script and model files along with platform details so we can help better?

Provide details on the platforms you are using:
o Linux distro and version
o GPU type
o Nvidia driver version
o CUDA version
o CUDNN version
o Python version [if using python]
o Tensorflow and PyTorch version
o TensorRT version