-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unifying C++ and Python ONNX parsers #727
Comments
Okay just ran them all. 1/109 isn't too bad right? 😭
|
@MatthewDaggitt , I agree this needs to be done. I think the differing input query might be because the variable indexing. In python Onnx parser, we make output variable to follow immediately after the input variable. I think to fully switch to C++ parser, we need to
|
Do you know why we do this? (I can't find any documentation as to the reason in the code). Does the C++ parser need to follow suit? |
There is a reason but it's not very good :). The output variables follow immediately after the input variables in the legacy Nnet format. And we had this test to make sure Marabounetwork object created from parsing the .nnet format and the onnx format is the same. But I think we can probably get rid of that test or at least rewrite that tests. In fact this reindexing can take many seconds on larger network, so I usually set the reindexing flag off in practice. |
Operations that need to add support for:
|
In addition, I think we should also try to make sure there is no significant degradation in terms of parsing time. |
Do you know which tests these are? It occurs to me that in the short term we should just move the |
Hum.., I can't seem to find the test. Perhaps we already got rid of it. When I set the reassignOutputVariables to false, all python tests but one ( |
Summary
At the moment, we have the deeply suboptimal solution of having two ONNX parsers, one in Python and one in C++. We should only have the C++ one, and expose Python bindings for it. However, before doing that we really need to ensure the two parsers actually agree.
Helper script
I've put together the following shell script that diffs the input query generated by both parsers.
I'm going to create issues for discrepancies in the files in
resources/onnx
that I find using this.The text was updated successfully, but these errors were encountered: