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?
indeed, we do not support those layers yet from ONNX. For creating custom layers, you should look at our documentation:
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.
Dear Ohad M.,
Unfortunately our documentation on Custom Layers is difficult to understand. Please read this forum post, which has helped many customers.