-
Notifications
You must be signed in to change notification settings - Fork 378
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
Attempting to broadcast an axis by a dimension other than 1. 16 by 96 #7
Comments
Thanks for your report! Could you please provide your ONNX model? You can send me by email: daquexian566@gmail.com |
It is a bug of pytorch->onnx converter. I have reported it to PyTorch: pytorch/pytorch#21271 |
It is solved in pytorch/pytorch#21330. Please install nightly PyTorch and re-export the onnx model then try again. |
thank u for reply, i have met the same problem ,could u tell me how to install nightly PyTorch? thank u very much |
On https://pytorch.org/get-started/locally/, select "preview(nightly)" to get the command |
I believe pytorch/pytorch#21330 has been included in PyTorch 1.2, so it's better to install pytorch 1.2 than pytorch nightly |
Here's the error message:
Simplifying...
Traceback (most recent call last):
File "/home/mywp/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/mywp/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/mywp/anaconda3/lib/python3.6/site-packages/onnxsim/main.py", line 24, in
main()
File "/home/mywp/anaconda3/lib/python3.6/site-packages/onnxsim/main.py", line 17, in main
model_opt = onnxsim.simplify(args.input_model, check_n=args.check_n, perform_optimization=not args.skip_optimization)
File "/home/mywp/anaconda3/lib/python3.6/site-packages/onnxsim/onnx_simplifier.py", line 187, in simplify
model_opt = eliminate_const_nodes(model_opt, get_constant_nodes(model_opt), forward_all(model_opt))
File "/home/mywp/anaconda3/lib/python3.6/site-packages/onnxsim/onnx_simplifier.py", line 105, in forward_all
res = forward(model)
File "/home/mywp/anaconda3/lib/python3.6/site-packages/onnxsim/onnx_simplifier.py", line 97, in forward
res = OrderedDict(zip(outputs, sess.run(outputs, inputs)))
File "/home/mywp/anaconda3/lib/python3.6/site-packages/onnxruntime/capi/session.py", line 72, in run
return self._sess.run(output_names, input_feed, run_options)
RuntimeError: Method run failed due to: [ONNXRuntimeError] : 1 : GENERAL ERROR : /onnxruntime_src/onnxruntime/core/providers/cpu/math/element_wise_ops.h:341 void onnxruntime::BroadcastIterator::Init(int64_t, int64_t) axis == 1 || axis == largest was false. Attempting to broadcast an axis by a dimension other than 1. 16 by 96
Stacktrace:
The text was updated successfully, but these errors were encountered: