Skip to content
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

Convert onnx with dynamic input shape #40

Closed
alexg93333 opened this issue Apr 3, 2023 · 2 comments
Closed

Convert onnx with dynamic input shape #40

alexg93333 opened this issue Apr 3, 2023 · 2 comments

Comments

@alexg93333
Copy link

alexg93333 commented Apr 3, 2023

I am running into this error. It would be great if somebody could help.

python3.10 converter.py --weights "./model.onnx" --formats "tflite" --int8

Checking 0/1...
WARNING:onnx_loader running::onnxsim is failed, maybe make convert fails.
Traceback (most recent call last):
File "/home/dockerpaddle/Desktop/onnx2tflite/converter.py", line 108, in
run()
File "/home/dockerpaddle/Desktop/onnx2tflite/converter.py", line 92, in run
onnx_converter(
File "/home/dockerpaddle/Desktop/onnx2tflite/converter.py", line 21, in onnx_converter
keras_model = keras_builder(model_proto, native_groupconv)
File "/home/dockerpaddle/Desktop/onnx2tflite/utils/builder.py", line 82, in keras_builder
tf_tensor[node_outputs[index]] = tf_operator(tf_tensor, onnx_weights, node_inputs, op_attr, index=index)(_inputs)
File "/home/dockerpaddle/Desktop/onnx2tflite/layers/conv_layers.py", line 57, in init
out_channel, in_channel = node_weights[node_inputs[1]].shape[:2]
KeyError: 'conv2d_0.w_0'

@MPolaris
Copy link
Owner

MPolaris commented Apr 8, 2023

Can you share onnx to me?
I need more information about model to fix this error.

@MPolaris
Copy link
Owner

fixed, please pull latest code and try again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants