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

CleanUnusedInitializersAndNodeArgs warning still issued after onnxoptimizer run #110

Open
sharvil opened this issue Jan 11, 2023 · 1 comment

Comments

@sharvil
Copy link

sharvil commented Jan 11, 2023

I converted a model from PyTorch to ONNX. The ONNX model produces > 100 warnings of the type:

2023-01-10 20:26:41.949523885 [W:onnxruntime:, graph.cc:3487 CleanUnusedInitializersAndNodeArgs] Removing initializer '1026'. It is not used by any node and should be removed from the model.

I used the following code to run onnxoptimizer on the model:

import onnx
import onnxoptimizer

model = onnx.load('model.onnx')
passes = onnxoptimizer.get_fuse_and_elimination_passes()
model = onnxoptimizer.optimize(model, passes)
onnx.save(model, 'model-opt.onnx')

I'm still seeing the same warnings when I load the optimized model. Here are the package versions I'm using:

>>> onnx.__version__, onnxoptimizer.__version__
('1.13.0', '0.3.6')
@HSQ79815
Copy link
Collaborator

@sharvil It is recommended that use onnx-simplifier .

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