tf_to_trt_image_classification icon indicating copy to clipboard operation
tf_to_trt_image_classification copied to clipboard

How to resolve unsupported layer issue for my model

Open varun-tangoit opened this issue 6 years ago • 7 comments

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

varun-tangoit avatar Dec 12 '18 12:12 varun-tangoit

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

ningjieliu avatar Jan 08 '19 07:01 ningjieliu

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

varun-tangoit avatar Jan 09 '19 09:01 varun-tangoit

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.

ningjieliu avatar Jan 09 '19 09:01 ningjieliu

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

varun-tangoit avatar Jan 09 '19 09:01 varun-tangoit

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.

ningjieliu avatar Jan 09 '19 09:01 ningjieliu

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.

varun-tangoit avatar Jan 09 '19 09:01 varun-tangoit

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

deaffella avatar Feb 21 '20 22:02 deaffella