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:
I converted a model from PyTorch to ONNX. The ONNX model produces > 100 warnings of the type:
I used the following code to run
onnxoptimizer
on the model:I'm still seeing the same warnings when I load the optimized model. Here are the package versions I'm using: