Output mismatch with original mxnet models

I try to convert mxnet model to  OpenVINO IR, but some operation didn’t support (_contrib_div_sqrt_dim, _contrib_arange_like, batch_dot, LayerNorm), so I try https://docs.openvinotoolkit.org/latest/openvino_docs_HOWTO_Custom_Layers_Guide.html this link and get the model can convert to IR and run now. The problem is the output is mismatch with the original mxnet models.

At first I think it was my implementation on those 4 layers is not correct, but I already separate check output from each layer with original mxnet model. The result is the same. Thus, I debug found that in original model, it have 12 LayerNorm, but when run with OpenVINO, it run only 10 LayerNorm and make output mismatch. (The weird thing is I check OpenVINO xml file and see 12 LAyerNorm). It seem like some part of the models didn’t run.

OpenVINO didn’t run LayerNorm in this part, so the work around method I use is get the Const value from mxnet and force Const as OpenVINO inputs. With this method, I get same result from OpenVINO and original mxnet models. However, it seem like this work around may hard to use on production.

I will attach the xml file which get the same result and didn’t get the same result and some code which I add for support LayerNorm. (I cannot provide weight file).

P.S. I use openvino 2021.4 version

model.zip (55.3 KB)

Thank you for your kind reply, it would be great if someone can help on this topic.

Thank you very much. I really appreciate it.

Thank you for your reply. I cannot provide the real trained model, but I can provide the random weight of model. I will try to prepare random weight and the step to reproduce the problem, then send it to you in this week.

Thank you again.

Hi Aznie,

This attach file contains the random weight models and README how to reproduce output mismatch (also how to make output match with the mxnet model). Feel free to tell me if you need anything more. Thank you very much.

openvino-investigate.zip (12.8 MB)

That would be nice. Thank you very much.