Operating system: ubuntu 16.04
Tensorflow version: 1.8
CUDA version: 9.0
CUDNN version: 7.0
TensorRT version: 3.04
I was converting a Tensorflow model (Yolo in darkflow) to TensorRT engine.
I defined the last layer as such:
self.out = tf.identity(state.out, name='output')
but I got this error:
Creating TensorRT environment...
Converted 112 variables to const ops.
Using output node output
Converting to UFF graph
Warning: No conversion function registered for layer: Identity yet.
Converting as custom op Identity output
name: "output"
op: "Identity"
input: "BiasAdd_22"
attr {
key: "T"
value {
type: DT_FLOAT
}
}
Traceback (most recent call last):
File "/usr/local/bin/flow", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/usr/src/app/darkflow/flow", line 6, in <module>
cliHandler(sys.argv)
File "/usr/src/app/darkflow/darkflow/cli.py", line 29, in cliHandler
tfnet.camera()
File "/usr/src/app/darkflow/darkflow/net/help.py", line 114, in camera
self.create_trt_env()
File "/usr/src/app/darkflow/darkflow/net/help.py", line 204, in create_trt_env
uff_model = uff.from_tensorflow(tf_model, ["output"])
File "/opt/uff/uff/converters/tensorflow/conversion_helpers.py", line 75, in from_tensorflow
name="main")
File "/opt/uff/uff/converters/tensorflow/converter.py", line 64, in convert_tf2uff_graph
uff_graph, input_replacements)
File "/opt/uff/uff/converters/tensorflow/converter.py", line 51, in convert_tf2uff_node
op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes)
File "/opt/uff/uff/converters/tensorflow/converter.py", line 28, in convert_layer
fields = cls.parse_tf_attrs(tf_node.attr)
File "/opt/uff/uff/converters/tensorflow/converter.py", line 177, in parse_tf_attrs
for key, val in attrs.items()}
File "/opt/uff/uff/converters/tensorflow/converter.py", line 177, in <dictcomp>
for key, val in attrs.items()}
File "/opt/uff/uff/converters/tensorflow/converter.py", line 172, in parse_tf_attr_value
return cls.convert_tf2uff_field(code, val)
File "/opt/uff/uff/converters/tensorflow/converter.py", line 146, in convert_tf2uff_field
return TensorFlowToUFFConverter.convert_tf2numpy_dtype(val)
File "/opt/uff/uff/converters/tensorflow/converter.py", line 74, in convert_tf2numpy_dtype
return np.dtype(dt[dtype])
TypeError: list indices must be integers, not AttrValue
Any help would be appreciated!!