-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
ONNX importer ModelParams bug #4521
Comments
This is strange and I'll try to figure out where that parameter is coming from. Just curious though, does this have any negative effect besides having to keep one extra (size 2) parameter around? |
Ok so what's happening is Onnx treats the shape of Reshape operators as parameters that naturally get added to the dictionary of global parameters during conversion. In Relay, however, the output shape of reshape is fixed so the parameters aren't needed. Instead of just peeking at the shape and leaving it in parameters, we can instead pop them out of the parameter dictionary like so (line 466 in onnx.py):
If we think this is a bug worth fixing (or if its even technically a bug at all) one of us can open a one line fix PR. |
Fixed in PR #4524 |
Using the onnx importer on mobilenetv2-1.0 with opset 7,
relay_params
appears to have an extra parameter as compared torelay_model
's parameters.Here's a repro of the bug:
The text was updated successfully, but these errors were encountered: