I am using TRT 4.0.1.6 and using the convert-to-uff utility to convert the .pb file into .uff file. If I do the same for the frozen.pb file from sampleUFFSSD, it is still able to convert to .uff by skipping over the unsupported layers. If I do it for another model, I get an error for “invalid” data type. How do I figure out which layer is causing this, as my model is huge, with over 2000 nodes? Here is the traceback
DEBUG: convert reshape to flatten node
Traceback (most recent call last):
File "/home/dhingratul/.virtualenvs/trt4/bin/convert-to-uff", line 11, in <module>
sys.exit(main())
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/bin/convert_to_uff.py", line 105, in main
output_filename=args.output
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/conversion_helpers.py", line 149, in from_tensorflow_frozen_model
return from_tensorflow(graphdef, output_nodes, preprocessor, **kwargs)
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/conversion_helpers.py", line 120, in from_tensorflow
name="main")
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/converter.py", line 76, in convert_tf2uff_graph
uff_graph, input_replacements)
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/converter.py", line 63, in convert_tf2uff_node
op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes)
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/converter.py", line 42, in convert_layer
return cls.registry_[op](name, tf_node, inputs, uff_graph, **kwargs)
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/converter_functions.py", line 429, in convert_sum
return _reduce_helper(name, tf_node, inputs, uff_graph, func="sum", **kwargs)
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/converter_functions.py", line 416, in _reduce_helper
array = tf2uff.convert_tf2numpy_const_node(tf_axes_node)
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/converter.py", line 121, in convert_tf2numpy_const_node
np_dtype = cls.convert_tf2numpy_dtype(tf_node.attr['dtype'].type)
File "/home/dhingratul/.virtualenvs/trt4/local/lib/python2.7/site-packages/uff/converters/tensorflow/converter.py", line 95, in convert_tf2numpy_dtype
return np.dtype(dt[dtype])
TypeError: data type "invalid" not understood