daquexian / onnx-simplifier

Simplify your onnx model
Apache License 2.0
3.67k stars 377 forks source link

How to prohibit constant reuse #312

Open huihui1 opened 8 months ago

huihui1 commented 8 months ago

Thank you for your reply https://github.com/daquexian/onnx-simplifier/issues/310 , the 'eliminate duplicate initializr option cannot meet my needs. Adding or not adding it, my multiple constant operators (with the same content) will still become one constant operator.

version info: onnx 1.14.1 onnx-simplifier 0.3.6 onnxoptimizer 0.3.13

multiple: image image image ... sim after: image

daquexian commented 8 months ago

please post your command

huihui1 commented 8 months ago

please post your command

image

daquexian commented 8 months ago

please try adding an extra skipped optimizer eliminate_common_subexpression