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.
6503 Discussions

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

Ohad_M_Intel
Employee
493 Views

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
Severine_H_Intel
Employee
493 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_Customize_Model_Optimizer.html

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
Shubha_R_Intel
Employee
493 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
Reply