Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build ssd engine failed #21

Closed
YoungSharp opened this issue Nov 20, 2019 · 15 comments
Closed

build ssd engine failed #21

YoungSharp opened this issue Nov 20, 2019 · 15 comments

Comments

@YoungSharp
Copy link

YoungSharp commented Nov 20, 2019

[TensorRT] ERROR: Could not register plugin creator: FlattenConcat_TRT in namespace:
WARNING: To create TensorRT plugin nodes, please use the create_plugin_node function instead.
NOTE: UFF has been tested with TensorFlow 1.14.0.
WARNING: The version of TensorFlow installed on this system is not guaranteed to work with UFF.
UFF Version 0.6.5
=== Automatically deduced input nodes ===
[name: "Input"
op: "Placeholder"
attr {
key: "shape"
value {
shape {
dim {
size: 1
}
dim {
size: 3
}
dim {
size: 300
}
dim {
size: 300
}
}
}
}
]

Using output node NMS
Converting to UFF graph
Warning: No conversion function registered for layer: NMS_TRT yet.
Converting NMS as custom op: NMS_TRT
Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_conf as custom op: FlattenConcat_TRT
Traceback (most recent call last):
File "build_engine.py", line 204, in
main()
File "build_engine.py", line 187, in main
debug_mode=DEBUG_UFF)
File "/usr/local/lib/python3.6/site-packages/uff/converters/tensorflow/conversion_helpers.py", line 178, in from_tensorflow
debug_mode=debug_mode)
File "/usr/local/lib/python3.6/site-packages/uff/converters/tensorflow/converter.py", line 94, in convert_tf2uff_graph
uff_graph, input_replacements, debug_mode=debug_mode)
File "/usr/local/lib/python3.6/site-packages/uff/converters/tensorflow/converter.py", line 79, in convert_tf2uff_node
op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes, debug_mode=debug_mode)
File "/usr/local/lib/python3.6/site-packages/uff/converters/tensorflow/converter.py", line 47, in convert_layer
return cls.registry_[op](name, tf_node, inputs, uff_graph, **kwargs)
File "/usr/local/lib/python3.6/site-packages/uff/converters/tensorflow/converter_functions.py", line 21, in convert_placeholder
dtype = tf2uff.convert_tf2numpy_dtype(tf_node.attr['dtype'].type)
File "/usr/local/lib/python3.6/site-packages/uff/converters/tensorflow/converter.py", line 103, in convert_tf2numpy_dtype
return tf.as_dtype(dtype).as_numpy_dtype
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py", line 712, in as_dtype
raise TypeError("Cannot convert value %r to a TensorFlow DType." % type_value)
TypeError: Cannot convert value 0 to a TensorFlow DType.

linux 16.04
cuda10.0
cudnn7.6.5
Tensorrt 6.0.1.5
tensorflow 1.12
python 3.6

command line: python3 build_engine.py ssd_mobilenet_v2_egohands

@jkjung-avt
Copy link
Owner

I haven't tested the code with TensorRT 6.x before...

Are you running the code on a Jetson platform? Or a x86 PC?

@YoungSharp
Copy link
Author

on x86 PC

@YoungSharp
Copy link
Author

error happend when converting Input node.

@jkjung-avt
Copy link
Owner

I don't have an answer right now. My code was originally developed and tested on Jetson (arm64) platforms.

I might find time to test that later.

@YoungSharp
Copy link
Author

i will keep trying, thanks.

@YoungSharp
Copy link
Author

@jkjung-avt
Do you mind to share your training code with?
The code to train ssd_mobilenet_v2_egohands.pb
my code is latest "https://github.com/tensorflow/models/blob/master/research", and my model is at "https://drive.google.com/file/d/1e-9cb_sLmuevA4h1IPP029vUH3IxlIx1/view?usp=sharing"
my email address is 331870428@qq.com
Appreciated.

@jkjung-avt
Copy link
Owner

I already shared all my training code on GitHub. I was using a slightly older snapshot of TensorFlow Object Detection API. Please refer to README.md in the repository and the associated blog posts for details.

https://github.com/jkjung-avt/hand-detection-tutorial

@YoungSharp
Copy link
Author

Thanks really

@jkjung-avt
Copy link
Owner

By the way, the problem you're facing might be due to some changes in TensorRT 6.0. I think the problem would likely go away if use TensorRT 5.x instead.

@YoungSharp
Copy link
Author

Your model works well under Tensorrt 6.x;
anyway, i will give it a try.

@jkjung-avt
Copy link
Owner

I see, Thanks for the update.

@Ndron
Copy link

Ndron commented Jan 30, 2020

same problem

@jkjung-avt
Copy link
Owner

@Ndron Could you check and make sure you have patched "graphsurgeon/node_manipulation.py"? More specifically, you have to add the following line of code into the file:

+    node.attr["dtype"].type = 1

Reference:

@Ndron
Copy link

Ndron commented Jan 30, 2020

@jkjung-avt Fixed , thanks

@aimuch
Copy link

aimuch commented Jul 2, 2020

@jkjung-avt Fixed , thanks

Hi, same problem,how did you solved it?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants