-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Tensor shape inference #71
Comments
This does not even require much work for ONNX: You can run the shape_inference method on the ONNX model which populates If you don't want to do that in Netron, let the user do that first and have it stored in the model:
|
hope support shape infer. 😆 |
this would be very useful... |
it does work on onnx, but is there any way to add infer shape on mxnet json/model? |
@suntao2012 Netron runs in the browser without any Python dependencies. |
Very helpful, thank you @Flamefire. Left is without shape inference. Right is with shape inference. One important thing to note. Currently, for the above to work, you must use opset version <9. The above was generated with opset version 8. I checked opset 7 also. Both worked fine. At present, for opset >=9, shapes will not be included and will not show as pointed out here:
|
@dsplabs thank you for the comment, and it's very helpful! My understanding is that we can't set opset version when exporting Pytorch to ONNX, right? |
@lookup1980 yes we can, by setting the
Works for me in PyTorch version 1.4. If you need to convert existing ONNX file, you can do so using:
|
Does not work for me... model:
Code:
Result: Thanks for any suggestions! |
@Flamefire |
Nice feature addition. Some of the segmentation models need OpSet=11. Is there as way we can get this working for OpSet=11? |
Is there any estimate on when this feature could be added? I see it was requested long time ago, and it would be extremely useful! |
@kobygold Keras files do not store inferred shapes. If you want to work on implementing this for Keras, acuity.js and darknet.js already have some support for reference. |
No description provided.
The text was updated successfully, but these errors were encountered: