daquexian / onnx-simplifier

Simplify your onnx model
Apache License 2.0
3.79k stars 380 forks source link

3 concatenations at the same time? [Request] #318

Open johnnynunez opened 10 months ago

johnnynunez commented 10 months ago

Most of the problems of edge devices is that onnx not simplifies concatenations. If we have 3 inputs at the same time, causes problems. So solutions I think that can be modify the original model at the position corresponding to 3 concatenations to use two parallel Concat structures. For example, if the input nodes are A, B, C and the output is Concat(A, B, C), modify it to Concat(Concat(A, B), C). Specify the specific dimensions for the reshape operation in this process to avoid abnormal precision caused by automatic inference.

model: yolov8