You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/08/14 16:22:36 UTC
[GitHub] [incubator-mxnet] photoszzt opened a new issue #18923: mxnet fail to import onnx model
photoszzt opened a new issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923
## Description
mxnet fail to import onnx model exported by pytorch. The model is from https://github.com/biubug6/Pytorch_Retinaface
### Error Message
(Paste the complete error message. Please also include stack trace by setting environment variable `DMLC_LOG_STACK_TRACE_DEPTH=10` before running your script.)
File "/disk/zhitingz/video-pipeline/sprocket/platform/lambda_program/onnxruntime/detection/detect.py", line 139, in mx_init
sym, arg_params, aux_params = onnx_mxnet.import_model(mpath)
File "/disk/zhitingz/mxnet-cpu/lib/python3.6/site-packages/mxnet/contrib/onnx/onnx2mx/import_model.py", line 59, in import_model
sym, arg_params, aux_params = graph.from_onnx(model_proto.graph)
File "/disk/zhitingz/mxnet-cpu/lib/python3.6/site-packages/mxnet/contrib/onnx/onnx2mx/import_onnx.py", line 115, in from_onnx
inputs = [self._nodes[i] for i in node.input]
File "/disk/zhitingz/mxnet-cpu/lib/python3.6/site-packages/mxnet/contrib/onnx/onnx2mx/import_onnx.py", line 115, in <listcomp>
inputs = [self._nodes[i] for i in node.input]
KeyError: '1'
## To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
Get the exported onnx model from the above link.
```
from mxnet.contrib import onnx as onnx_mxnet
sym, arg_params, aux_params = onnx_mxnet.import_model(mpath)
```
## What have you tried to solve it?
1. I try to print the node.input. It's ['input0', '1'].
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] photoszzt commented on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
photoszzt commented on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-674429111
I update the issue with my forked repo that contains some helpful script to reproduce this issue.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] TristonC commented on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
TristonC commented on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-832407145
Thanks, @Zha0q1. Import might be more important if a user want to test the performance on different frameworks. @szha @sandeep-krishnamurthy Do we have any project to imporve the ONNX model importing?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] Zha0q1 commented on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-832406011
no.. the recent onnx development has been focused on exporting rather than importing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] photoszzt edited a comment on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
photoszzt edited a comment on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-674429111
I update the issue with my forked repo that contains some helpful scripts to reproduce this issue.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] szha commented on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
szha commented on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-674442338
cc @josephevans and @ChaiBapchya
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-mxnet] TristonC commented on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
TristonC commented on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-832404381
@Zha0q1 Have MXNet 1.x made any progress for this issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] Joe2loft commented on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
Joe2loft commented on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-926378872
@photoszzt @Zha0q1 you can add args keep_initializers_as_inputs=True when you run torch.onnx.export function.
but after that, i meet another problem ----- mxnet dont have resize op .
i found it's because there's a torch.nn.functional.interpolate function in retinaface, which will be transform to resize op by onnx, but mxnet dont have resize op.
i tried to add a resize op , but i'm not familiar with mxnet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org
[GitHub] [incubator-mxnet] github-actions[bot] commented on issue #18923: mxnet fail to import onnx model
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #18923:
URL: https://github.com/apache/incubator-mxnet/issues/18923#issuecomment-674153820
Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue.
Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly.
If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on [contributing to MXNet](https://mxnet.apache.org/community/contribute) and our [development guides wiki](https://cwiki.apache.org/confluence/display/MXNET/Developments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org