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

yolov5s.onnx转换tflite出错 #55

Open
crash-A opened this issue Sep 25, 2023 · 2 comments
Open

yolov5s.onnx转换tflite出错 #55

crash-A opened this issue Sep 25, 2023 · 2 comments

Comments

@crash-A
Copy link

crash-A commented Sep 25, 2023

这是我的转换代码
from converter import onnx_converter
onnx_converter(
onnx_model_path = "./yolov5s.onnx",
need_simplify = True,
output_path = "./",
target_formats = ['tflite'], # or ['keras'], ['keras', 'tflite']
weight_quant = False,
int8_model = False,
int8_mean = None,
int8_std = None,
image_root = None
)
这是报错内容
Checking 0/1...
INFO:deformation_layers ::Reshape will process tensor after change back to NCHW format.
Traceback (most recent call last):
File "e:\nncase\onnx2tflite-main\onnx2tflite-main\onnx2tflite.py", line 2, in
onnx_converter(
File "e:\nncase\onnx2tflite-main\onnx2tflite-main\converter.py", line 21, in onnx_converter
keras_model = keras_builder(model_proto, native_groupconv)
File "e:\nncase\onnx2tflite-main\onnx2tflite-main\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 "e:\nncase\onnx2tflite-main\onnx2tflite-main\layers\deformation_layers.py", line 140, in init
end = start + node_attribute['split'][index]
KeyError: 'split'
能麻烦看一下吗

@shichaoya
Copy link

这个问题有解决嘛,我也遇到了这个问题

@MPolaris
Copy link
Owner

额,你们可以debug一下这里,并自己修改一下。
如果还有问题,可以传一个onnx来我看看。

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

4 participants
@MPolaris @shichaoya @crash-A and others