Error in converting a tensorflow model to FF and builds the TensorRT engine


I created an SSD-Mobilenet Object Detection Model using PyTorch and the Open Images dataset.after that it was converted into ONNX and then into PB, when trying to convert to FF gives this error.
I also tried it with another model already trained in tensorflow and it gives the same error, the example models I can run normal.

I’m using the tensorrt_demos library

Jetson nano
JetPack 4.5.1
tensorflow 1.15.5
numpy 1.16.1
uff 0.6.9
graphsurgeon 0.4.5
protobuf 3.17.3

Request you to share the ONNX model and the script if not shared already so that we can assist you better.
Alongside you can try few things:

  1. validating your model with the below snippet

import sys
import onnx
filename = yourONNXmodel
model = onnx.load(filename)
2) Try running your model with trtexec command.
In case you are still facing issue, request you to share the trtexec “”–verbose"" log for further debugging

well, so far I haven’t been able to convert the PB model into FF and later to bin tensorRT enginem, but instead I took the ONNX model and managed to convert it into .engine tensor RT.

I wanted the model in bin because there are several examples of code in python, would you have any example of python code using the .engine model with the webcam?

files: (10.7 KB)
ssd_mobilenet.pb (25.9 MB)
ssd-mobilenet.onnx (25.3 MB)

if you can find the cause of the error in converting the PB model into FF or make available python codes using model.engine I will be grateful

Hi @matheuscaltran,

Hope following examples will be helpful to you. And could you please give more details/steps you are following for converting model to FF.

Thank you.

I’m using demo #3 SSD, adding the command to my model to and trying to run that error


Are you still facing this issue.

yes, give up on pytorch now i’m training a straight with tensorflow