daquexian / onnx-simplifier

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

Consecutive squeeze unsqueeze layers could be simplified #315

Open louismeeckers opened 7 months ago

louismeeckers commented 7 months ago

Describe the bug For some reason, the model I am exporting from PyTorch to ONNX has the following structure: image

I believe onnx-simplifier could identify those cases and remove consecutive squeeze unsqueeze layers.