Visualizing tensorRT engine

Is it possible to visualize a tensorRT engine(optimized model), so I can see the model structure, just like visualize a tensorflow model(.pb file)?



I assume you are asking for something analogous to tensorboard or netron? Unfortunately, I’m not aware a way for TRT.

yes, I am asking is there a tool like tensorboard or netron that I can see the TRT engine, if not, is it possible that convert TRT engine to tensorflow PB format or any other format, like ONNX, then I can use tensorboard or netron to see the optimized network?

Just store your TRT_graph using code below, and upload to netron browser (or use tensorboard), you will see “TRTEngineOp” there if your model is successfully optimized by TensorRT.

with gfile.FastGFile("trt_graph.pb", 'wb') as f:
print("TRT model is stored!")

The netron can open onnx foramt model, but cannot open engine format model, but the onnx model i have is the original model that is not optimized, so i want to know can we output a onnx format model this is optimized by tensorrt ?