Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AKlus
Beginner
428 Views

Unable to import ONNX: There is no registered "infer" function with op = "Floor"

Jump to solution

So I'm trying to convert an ONNX model to OpenVINO, and got the following output:

(pystyle) C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer>python mo.py --input_model decoderFHD.onnx

Model Optimizer arguments:

Common parameters:

- Path to the Input Model: C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\decoderFHD.onnx

- Path for generated IR: C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\.

- IR output name: decoderFHD

- Log level: ERROR

- Batch: Not specified, inherited from the model

- Input layers: Not specified, inherited from the model

- Output layers: Not specified, inherited from the model

- Input shapes: Not specified, inherited from the model

- Mean values: Not specified

- Scale values: Not specified

- Scale factor: Not specified

- Precision of IR: FP32

- Enable fusing: True

- Enable grouped convolutions fusing: True

- Move mean values to preprocess section: False

- Reverse input channels: False

ONNX specific parameters:

Model Optimizer version: 2019.1.1-83-g28dfbfd

[ ERROR ] Unexpected exception happened during extracting attributes for node 43.

Original exception message: One/both of widths_scale = None and height_scale = None is not defined for Upsampe node 44.

 

I do see that the Upsample layer is supported for ONNX models..

The model that gives the error is decoderrand.onnx included in https://github.com/Aeroxander/decodererror

 

But now I just manually set both variables to 1.0 and that seemed to fix this (hope I didn't destroy the network accuracy, have no idea what the actual values would be).

 

So now that that problem is semi-fixed, I get this error:

 

There is no registered "infer" function for node "33" with op = "Floor". Please implement this function in the extensions.

 

Is the only way to fix this to manually add the Floor function myself?

 

0 Kudos
1 Solution
Shubha_R_Intel
Employee
428 Views

Dear Dearest Klus, Alexander,

Please study the Supported Layers Document.  Your model actually has more than one unsupported layer, for instance Gather, Floor, Cast (see attached image). Model Optimizer had a very un-user-friendly manner of letting you know of this, however. You can get around these unsupported layers by building Custom layers.  I answered a question custom layers IDZ post on how to do that. If you build Custom Layers you can actually get this model to work with OpenVino (both the Model Optimizer and Inference Engine). Hope it helps. Shubha

decoderrand_snapshot.png

 

View solution in original post

9 Replies
AKlus
Beginner
428 Views

Isn't the floor function just std::floor or isn't it that simple?

Shubha_R_Intel
Employee
428 Views

Dear Klus, Alexander,

Would you mind attaching your ONNX model here ? Or if you'd prefer let me know and I can PM you privately and you can send it to me via PM.

Thanks,

Shubha

 

AKlus
Beginner
428 Views
Shubha_R_Intel
Employee
428 Views

Dearest Klus, Alexander,

Thanks. This helps a lot. Allow me some time to investigate. Will report back here.

Shubha

 

Shubha_R_Intel
Employee
429 Views

Dear Dearest Klus, Alexander,

Please study the Supported Layers Document.  Your model actually has more than one unsupported layer, for instance Gather, Floor, Cast (see attached image). Model Optimizer had a very un-user-friendly manner of letting you know of this, however. You can get around these unsupported layers by building Custom layers.  I answered a question custom layers IDZ post on how to do that. If you build Custom Layers you can actually get this model to work with OpenVino (both the Model Optimizer and Inference Engine). Hope it helps. Shubha

decoderrand_snapshot.png

 

View solution in original post

AKlus
Beginner
428 Views

Thank you very much! I'll do my best to add the custom layers!

Shubha_R_Intel
Employee
428 Views

Dear Klus, Alexander,

One mistake - Gather and Cast definitely seem to be supported but our documentation doesn't mention it. I have filed a bug on this. I see these files :

deployment_tools\model_optimizer\extensions\front\onnx\cast_ext.py

deployment_tools\model_optimizer\extensions\front\onnx\gather_ext.py

But I don't see a floor_ext.py !

Thanks,

Shubha

B__M
Beginner
428 Views

Klus, Alexander,

While converting an ONNX model to OpenVINO I am also running into the "There is no registered "infer" function for node "891" with op = "Floor"." error.

Were you able to add the Floor extension? If so, could you please share your code?

Thanks.

yili__li
Beginner
428 Views

I have the same problem like Klus, would you prepare to add the Floor extension?

Reply