Jetson TX2 TensorFlow/TensorRT Workflow


I am trying to convert a trained TensorFlow model to run on my TX2 using TensorRT, but I’m a bit lost on the steps involved. I am registered for the March 8th webinar on this topic, but I was hoping I could get some clarification beforehand (and maybe I can even get something working in the meantime). Note that I have my TX2 set up with JetPack 3.2, so it has TensorRT 3.0 on it.

Here is my understanding of the steps involved:

  1. Train the network in TensorFlow and then freeze the network into a .pb file. This can be done on any machine.
  2. Convert the .pb file to a UFF file using the script. My understanding is that the resulting UFF file is still platform independent, so this step can be done on any machine.
  3. From the UFF file, build a TensorRT engine. Based on my reading of the documentation, this step must be done on the TX2 itself, since the resulting serialized engine (I want to save it to a file so I can just use said file over and over again for inference) is platform specific. Also, since this step must be done on the TX2 and because the new Python API isn’t supported on ARM, this mean writing some C++ code to handle this step.
  4. Do inference using the engine created in step #3. Once again, this means some C++ running on the TX2, although this should be as easy as just loading the engine and then calling the appropriate inference function.

Am I on the right track? Is there anything I’m missing? Thanks in advance for the help.

Hi dwd_pete,

It looks like you’re on the right track!

Assuming the operations in your model are supported by the version of TensorRT you are using, the steps you outlined should work.

Let me know if you have any other questions.



I would like to know if YOLO Darknet models build using tensorflow are supported in Jetson.



We are not familiar with YOLO TensorFlow model you mentioned.

You can check if your model is supported by TensorRT with our document:

More, here is also a tutorial to demonstrate TensorFlow to TensorRT use-case for your reference: