Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6404 Discussions

unsupported layer type "Sign" when compiling onnx to blob

mrvladimir
Beginner
656 Views

I'm trying to compile an onnx model to blob format using the online compiler tool, and I'm getting the following error:

 

[ GENERAL_ERROR ] /home/jenkins/agent/workspace/private-ci/ie/build-linux-ubuntu20/b/repos/openvino/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp:441 Failed to compile layer "sign": unsupported layer type "Sign"

Inference Engine:

IE version ......... 2021.4.2

Build ........... 2021.4.2-3974-e2a469a3450-releases/2021/4

 

[Warning][VPU][Config] Deprecated option was used : VPU_MYRIAD_PLATFORM

 

Looking at the docs here the "Sign" layer should be supported: https://docs.openvino.ai/latest/openvino_docs_MO_DG_prepare_model_Supported_Frameworks_Layers.html#onnx-supported-operators

 

Is this a bug or am I doing something wrong?

0 Kudos
8 Replies
Peh_Intel
Moderator
634 Views

Hi Mr Vladimir,


Have you try compiling the ONNX model using Compile Tool that included in the Intel® Distribution of OpenVINO™ toolkit?


Meanwhile, you can share your ONNX model with us for further investigation.



Regards,

Peh


0 Kudos
mrvladimir
Beginner
619 Views

I still get the same error. I compiled compile_tools from source.

 

Here's my model:

import numpy as np
import onnx.helper as h
import onnxruntime as rt
from onnx import numpy_helper
from onnx import TensorProto
import onnx
import blobconverter
import math
 
nodes = [
h.make_node(
'Constant',
inputs=[],
outputs=['floor_mask'],
value=numpy_helper.from_array(np.array([1,2,3], dtype=np.float32))
),
h.make_node('Sub', inputs=['x', 'floor_mask'], outputs=['sub']),
h.make_node('Sign', inputs=['sub'], outputs=['sub_signed']),
]

g = h.make_graph(nodes, 'filtering', [h.make_tensor_value_info('x', TensorProto.FLOAT, [3])],
[h.make_tensor_value_info('sub_signed', TensorProto.FLOAT, [3])])
model = h.make_model(g, producer_name='vladimir')
model.opset_import[0].version = 16
onnx.checker.check_model(model)


onnx.save_model(model, 'test.onnx', )
 
 
I compile like so:
$ mo --input_model test.onnx
$ /usr/local/tools/compile_tool/compile_tool -m ~/experiments/floor/test.xml -ip U8 -op FP32 -d MYRIAD -o ~/experiments/floor/test.blob
 
OpenVINO Runtime version ......... 2022.2.0
Build ........... custom_master_ab8c2f6fd8ac9088a90f1009f8842498c7bda197
Network inputs:
x : u8 / [...]
Network outputs:
sub_signed/sink_port_0 : f32 / [...]
[ GENERAL_ERROR ]
/home/vlad/openvino/src/plugins/intel_myriad/graph_transformer/src/frontend/frontend.cpp:594 Failed to compile layer "sub_signed": unsupported layer type "Sign"
 
 
0 Kudos
Peh_Intel
Moderator
609 Views

Hi Mr. Vladimir,

 

Thanks for sharing your ONNX model with us.

 

I obtained the same error (unsupported layer type "Sign") when compiling the IR files to blob file. Furthermore, I also ran Benchmark App with the ONNX model on Intel® Neural Compute Stick 2 (NCS2). It showed up the same error which NCS2 was unable to read ONNX model due to the unsupported layer type "Sign".

 

By the way, the ONNX model can be read and load to CPU.

 

Regards,

Peh

 

0 Kudos
Peh_Intel
Moderator
576 Views

Hi Mr. Vladimir,


Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored. 



Regards,

Peh


0 Kudos
mrvladimir
Beginner
568 Views
This sounds like a bug. Is there a work around?
0 Kudos
Peh_Intel
Moderator
558 Views

Hi Mr Vladimir,


In this case, I would like to channel this issue to our development team for the rectification on the support layer type “Sign”.


Any fix or workaround is expected to be available in the future release.   



Sincerely,

Peh


0 Kudos
Hari_B_Intel
Moderator
441 Views

Hi Vladimir,

 

Thank you for your patience, we received information from the development team that the "Sign" operation is not supported by Myriad/HDDL plugins.


Apology for the inconvenience and we will update the documentation accordingly.


0 Kudos
Peh_Intel
Moderator
414 Views

Hi Mr Vladimir,


Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.



Regards,

Peh


0 Kudos
Reply