-
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
TypeError: 0 has type numpy.int64, but expected one of: int #1
Comments
Hi, thanks for your report! Could you please provide the onnx model? |
The model size is too big to attach. could you pls let me know your mailbox? I'm sending model file by email?? |
All right. My email is daquexian566@gmail.com. Thanks!
…On Fri, May 3, 2019, 6:08 PM Toming ***@***.***> wrote:
The model size is too big to attach. could you pls let me know your
mailbox? I'm sending model file by email??
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACYRZHZIAXWCL46NMO675KTPTQFLFANCNFSM4HKSBEWQ>
.
|
check you mailbox now, already sent to you |
@tomingliu The model got simplified successfully on my side. I think the error you met is caused by protobuf. Could you provide your protobuf version? It can be got by the following command
And then please upgrade protobuf to the latest version and check if the error still exists. |
Than you for reply quickly! Problem was solved by upgrading protobuf from 3.0.0 to 3.7.1 |
Thanks for your report. Require protobuf>=3.7.0 in 468d60f |
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/onnxsim/main.py", line 18, in
main()
File "/usr/local/lib/python3.6/dist-packages/onnxsim/main.py", line 12, in main
model_opt = onnxsim.simplify(args.input_model)
File "/usr/local/lib/python3.6/dist-packages/onnxsim/onnx_simplifier.py", line 179, in simplify
model_opt = eliminate_const_nodes(model_ori, get_constant_nodes(model_ori), forward_all(model_ori))
File "/usr/local/lib/python3.6/dist-packages/onnxsim/onnx_simplifier.py", line 130, in eliminate_const_nodes
vals=np.array(res[node.output[0]]).flatten().astype(get_np_type_from_elem_type(elem_type))
File "/usr/local/lib/python3.6/dist-packages/onnx/helper.py", line 173, in make_tensor
getattr(tensor, field).extend(vals)
TypeError: 0 has type numpy.int64, but expected one of: int
The text was updated successfully, but these errors were encountered: