Getting error during TF-TRT on tx2

I was following 2.2.2. TF-TRT 1.x Workflow With A Frozen Graph

but I got an error -

2020-12-17 18:35:57.947055: E tensorflow/core/grappler/] Fetch node logits doesn’t exist in graph
Traceback (most recent call last):
File “”, line 12, in
trt_graph = converter.convert()
File “…/lib/python3.6/site-packages/tensorflow_core/python/compiler/tensorrt/”, line 546, in convert
File “…/lib/python3.6/site-packages/tensorflow_core/python/compiler/tensorrt/”, line 475, in _convert_graph_def
File “…/lib/python3.6/site-packages/tensorflow_core/python/compiler/tensorrt/”, line 453, in _run_conversion
File “…/lib/python3.6/site-packages/tensorflow_core/python/grappler/”, line 41, in OptimizeGraph
verbose, graph_id)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Failed to import metagraph, check error log for more info.


Which TensorFlow version do you install?
Please noted that this instruction is for the v1.x version.

If you are using TF-v2.x, please refer to the below section:


I am using TensorFlow 1.15 and JetPack 4.4


Sorry for the late update.

The error indicates that the fetch mode (ex. input or output) doesn’t exist.
Please check your model with TensorBoard to see if the node name is correct.

For example, the tutorial’s output name is logits and classes.
Please update it based on your model.