TF-TRT Converter Error on Jetson Nano

Hello,

I am trying to convert my Tensorflow Frozen graph model (.pb) to TensorRT format.

My tensorflow version is: tensorflow 1.15.5+nv21.3

I share my convert script below:

from tensorflow.python.compiler.tensorrt import trt_convert as trt

converter=trt.TrtGraphConverter(input_graph_def=“frozen_inference_graph.pb”, nodes_blacklist=[‘logits’,‘classes’])
frozen_graph=converter.convert()

When I run this script, I get an error. Here is my error

2021-08-25 20:48:10.964086: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘libnvinfer.so.7’; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory
2021-08-25 20:48:10.964404: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘libnvinfer_plugin.so.7’; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory
2021-08-25 20:48:10.964447: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
2021-08-25 20:48:10.967269: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘libnvinfer.so.7’; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory
2021-08-25 20:48:10.967326: F tensorflow/compiler/tf2tensorrt/stub/nvinfer_stub.cc:49] getInferLibVersion symbol not found.
Aborted (core dumped)

How can I convert my .pb tensorflow model to TensorRT model?
Tensorflow model is trained deeplab segmentation model.

My jetson nano is Jetpack 4.6, TensorRT version is 8.0.1 and cuda10.2.

Thanks

Hi,

The TensorFlow version is incorrect.

Please noted that we upgrade the TensorRT library from v7.1 into v8.0 in JetPack4.6.
You will need to use v1.15.5+nv21.8 for JetPack 4.6 instead.

$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v46 'tensorflow<2'

Thanks.