[Issue](https://issues.apache.org/jira/browse/MXNET-852) to add testing to JNI 
code.

I'll expand on what I said earlier for testing:
Reproducing the issue was fairly straight forward. Using the existing custom 
operator as a template, I trained and saved a model with a custom operator. 
Then I attempted to load the model multiple times. On the 3rd attempt a fatal 
"Operator not found error" was thrown. I then trained another model with 3 of 
the same custom operators, saved it, then attempted to load it and received the 
same error.

In both cases, the error was being thrown whenever the upgrade model process 
called the opPropDel for the 3rd time. The best that I can tell the opPropDel 
method is only called by the upgradeJSON method when loading a model trained on 
an older version of MXNet. In this case, there was a counter in the JNI code 
that on the 3rd time opPropDel was called the custom operator would be 
deregistered in the native code making all instances of the custom operator 
unusable and producing a fatal error on the next attempt.

My change was to remove the code that did the deregister and make opPropDel 
method simply return success (which is what it was already doing up until it 
hit the counter threshold).

After making this change I loaded the same models that I had trained previously 
and this time they loaded without issue.

[ Full content available at: 
https://github.com/apache/incubator-mxnet/pull/11885 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to