NVIDIA-AI-IOT/tf_trt_models

Slower performance when writing to file?

atyshka opened this issue · 1 comments

I'm using the jupyter example to create these trt-optimized graphs for use in my projects. I'm taking the TensorRT converted graph, writing it to a file, and then loading that pb file in and performing inference. However, I've noticed the runtimes I get when doing this are about 3 times greater than the runtimes reported by the notebook. Either the notebook is reporting incorrect times or somehow reconstructing the graph from the file creates a different graph than the original that is somehow slower. Has anyone been able to reproduce this issue?

For example, for resnet_50_fpn_coco, sess.run(...) takes about 0.1 s, but when using the graph written to the .pb file the same code takes 0.3s.