Error while converting the PB file to UFF file

TensorRT 4.0.1
TensorFlow 1.6
Ubuntu 16.04
Graphics QuadroM2200
Python version 2.7
CUDA version 9.0

while converting the PB file to UFF format got error global name UFFexception is not defined.

Please let me know very thankful to you.

PF attached screenshot of error

Thanks ,
Madhav

Hi,

Could you try our latest TensorRT?
It should be TensorRT 5.0.

Thanks.

Hi AastaLLL,

Above error got solved by change in the converter.py file

Now error i got is related to output node name

import tensorrt
import tensorflow
import os
import uff
pb_file="./Reshape1_frozen_model.pb"
uff.from_tensorflow_frozen_model(pb_file,output_nodes=[“output/Reshape_1”])
Using output node output/Reshape_1
Converting to UFF graph
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/conversion_helpers.py”, line 149, in from_tensorflow_frozen_model
return from_tensorflow(graphdef, output_nodes, preprocessor, **kwargs)
File “/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/conversion_helpers.py”, line 120, in from_tensorflow
name=“main”)
File “/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py”, line 78, in convert_tf2uff_graph
uff_graph, input_replacements)
File “/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py”, line 55, in convert_tf2uff_node
raise UffException(str(name) + " was not found in the graph. Please use the -l option to list nodes in the graph.")
uff.model.exceptions.UffException: output/Reshape_1 was not found in the graph. Please use the -l option to list nodes in the graph.

to get the output node name i have refereed this link

https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/optimizing-neural-networks-for-mobile-and-embedded-devices-with-tensorflow/determine-the-names-of-input-and-output-nodes

let mi know very thankful to you

Thanks,
Madhav Chamle