-
-
Notifications
You must be signed in to change notification settings - Fork 12
[ ERROR ] There is no registered "infer" function for node "Unpooling_53" with op = "Unpooling". Please implement this function in the extensions. #40
Comments
@likholat, @alexeyhorkin, do you still have an alternative solution with MO Python extension which allows replace MaxUpooling to known ops? Cannot find in openvinotoolkit/openvino_notebooks#487 Update: Never mind @Rakshith2597, may I ask you to try this approach which let you don't use custom extensions at all: openvinotoolkit/openvino#11400. You need create an alias for unpooling layer, export PyTorch model with it and then convert to OpenVINO IR using Model Optimized extension from the PR. |
@dkurt , Here are the steps I did, please let me know if I am doing it right.
Got the following error:
I think i might have missed something here
Could you please elaborate this? Sorry, I'm new to this. |
Seems fine, but can you try |
I'm converting my PyTorch model to ONNX using,
This raises the error mentioned in the previous comment. |
@Rakshith2597, got it, thanks! Is there a way to share model definition so I can reproduce and propose a solution? |
@dkurt , Sure, below is the model definition. Additionally, I have provided the model definition, model weights, onnx file, error and debug log from mo in GDrive if you need it here.
|
@Rakshith2597, seems like the following steps helped me convert a model:
self.unpool1 = nn.MaxUnpool2d(2, stride=2)
...
unpool1 = torch.cat([self.unpool1(donv2, idxs1), conv1], 1) # not .apply
unpool5 = torch.cat([self.unpool5(pool5 + 1e-10, idxs5), conv5b], 1)
--- a/mo_extensions/front/onnx/max_unpool2d_decomposition.py
+++ b/mo_extensions/front/onnx/max_unpool2d_decomposition.py
@@ -20,7 +20,7 @@ class MaxUnpoolFrontReplacer(FrontReplacementSubgraph):
nodes=[
("max_pool0", dict(op="MaxPool")),
("max_pool1", dict(op="MaxPool")),
- ("slice", dict(op="AttributedSlice")),
+ ("slice", dict(op="Slice")),
("sub", dict(op="Sub")),
("unpool", dict(op="max_unpool2d")),
], |
@dkurt Thanks a lot for your help. I am able to convert the model to IR. |
@dkurt Hi, on trying to do inference with the ONNX model generated, I'm getting the following error.
Code used to do inference
Code used to create ONNX model
Am I missing something? |
Not sure that ONNX Runtime can handle this layer. I've tested OpenVINO 2022.2 and inference was fine. |
Hi @dkurt ,
Your solution to overcome a pytorch to IR model conversion issue here was really helpful, however we couldn't proceed with the PR due to dataset license issues. I am facing issue with model conversion in another model, this time it is due to maxunpooling layer in the decoder. I came across your really good extension. However, I am still not able to resolve the problem.
Receiving the following the error while converting model with maxunpool.
Environment Specs:
You can find the model definition, model weights, onnx file, error and debug log from
mo
here.The text was updated successfully, but these errors were encountered: