Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
30 Views

Model optimizer for ONNX doesn't support Sqrt and Max ops from PyPortch

I exported a model from PyTorch to ONNX.

The model includes Max and Sqrt operations. During optimization I get this error:

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

 

Is support for these operations expected in the near future?

How would I add custom operations?

 

Thanks

 

0 Kudos
2 Replies
Highlighted
30 Views

Hi Ohad, 

indeed, we do not support those layers yet from ONNX. For creating custom layers, you should look at our documentation: 

https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_customize_model_optimizer_Customiz...

In your case, the extension should be inside: \deployment_tools\model_optimizer\extensions\front\onnx

You can already how Max and Sqrt are implemented through Tensorflow (deployment_tools\model_optimizer\extensions\front\tf). It should give you a good idea of the implementation for ONNX. 

Best, 

Severine

0 Kudos
Highlighted
Employee
30 Views

Dear Ohad M.,

Unfortunately our documentation on Custom Layers is difficult to understand. Please read this forum post, which has helped many customers.

https://software.intel.com/en-us/forums/computer-vision/topic/805980

Thanks,

Shubha

0 Kudos