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

How to resolve unsupported layer issue for my model #37

Open
varun-tangoit opened this issue Dec 12, 2018 · 7 comments
Open

How to resolve unsupported layer issue for my model #37

varun-tangoit opened this issue Dec 12, 2018 · 7 comments

Comments

@varun-tangoit
Copy link

Hi,

Im currently working on facenet,mtcnn model while i need to optimize my model with TensorRT. I have .pb file for model, when i try to convert with uff model i have some error kind of;

uff_model = uff.from_tensorflow_frozen_model("20180518-115854.pb", ["embeddings"])

Warning: keepdims is ignored by the UFF Parser and defaults to True
Warning: No conversion function registered for layer: QueueDequeueUpToV2 yet.
Converting as custom op QueueDequeueUpToV2 batch_join
name: "batch_join"
op: "QueueDequeueUpToV2"
input: "batch_join/fifo_queue"
input: "batch_size"
attr {
key: "component_types"
value {
list {
type: DT_FLOAT
type: DT_INT64
}
}
}
attr {
key: "timeout_ms"
value {
i: -1
}
}

Warning: No conversion function registered for layer: FIFOQueueV2 yet.
Converting as custom op FIFOQueueV2 batch_join/fifo_queue
name: "batch_join/fifo_queue"
op: "FIFOQueueV2"
attr {
key: "capacity"
value {
i: 1440
}
}
attr {
key: "component_types"
value {
list {
type: DT_FLOAT
type: DT_INT64
}
}
}
attr {
key: "container"
value {
s: ""
}
}
attr {
key: "shapes"
value {
list {
shape {
dim {
size: 160
}
dim {
size: 160
}
dim {
size: 3
}
}
shape {
}
}
}
}
attr {
key: "shared_name"
value {
s: ""
}
}

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/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/python3.5/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 120, in from_tensorflow
name="main")
File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 76, in convert_tf2uff_graph
uff_graph, input_replacements)
File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 63, in convert_tf2uff_node
op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes)
File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 38, in convert_layer
fields = cls.parse_tf_attrs(tf_node.attr)
File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 209, in parse_tf_attrs
for key, val in attrs.items()}
File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 209, in
for key, val in attrs.items()}
File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 204, in parse_tf_attr_value
return cls.convert_tf2uff_field(code, val)
File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 189, in convert_tf2uff_field
'type': 'dtype', 'list': 'list'}[code]
KeyError: 'shape'

I can't proceed further, im stuck on this, pls give me some suggestion how to resolve this issue

@ningjieliu
Copy link

The same error with you. Have you solved this problem?

@varun-tangoit
Copy link
Author

Nope.. If you have resolved, pls let me know.

@ningjieliu
Copy link

I tried to use insightface to replace facenet and it works. The technology support in nvidia said that facenet has some un-support layers so that it cannot directly convert to uff unless you have the caffemodel. It seems that the caffemodel has plug-in API.

@varun-tangoit
Copy link
Author

Can you please help me with more detail or where do refer and resolve this issue.. im stuck on this issue. Thanks in advance

@ningjieliu
Copy link

In fact, I use the resnet_v1_50 model in this github: https://github.com/auroua/InsightFace_TF
and then convert .ckpt file to .pd file. Finally use uff.from_tensorflow() to uff. I just entirely give up the facenet. Hope it can help you.

@varun-tangoit
Copy link
Author

varun-tangoit commented Jan 9, 2019

Thanks for the help. i will try.. Once you convert tensorRT please tell me how much fps would reached on jetson tx2.. i need to know performance increased or not for facenet model.

@deaffella
Copy link

deaffella commented Feb 21, 2020

In fact, I use the resnet_v1_50 model in this github: https://github.com/auroua/InsightFace_TF
and then convert .ckpt file to .pd file. Finally use uff.from_tensorflow() to uff. I just entirely give up the facenet. Hope it can help you.

Hi!
Have you solve this issue? I want to convert facenet to trt model too but I ran into a lot of problems

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

3 participants