-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
UnboundLocalError: local variable 'idx' referenced before assignment
#10
Comments
I'm so sorry for that, you can remove line 161 and delete(node), I will sovle it soon, btw, your onnx mode seems invalid, it doesn't have weight. |
@inisis Right - the actual model is too large, so I save the graph and weights separately. Luckily onnxslim only needs the graph to work. import onnx
m = onnx.load('original.onnx')
onnx.save(m, 'small.onnx', save_as_external_data=True) |
@xenova so what does the output looks like after this modification |
I did this:
import onnx
m = onnx.load('large_model.onnx')
onnx.save(m, 'model.onnx', save_as_external_data=True)
This works :) |
That's greate. Onnxslim will automatically save your onnx into graph and weight separately. |
When running
on this file: test.zip
I get the following error:
stemming from these lines of code:
OnnxSlim/onnxslim/core/optimizer.py
Lines 159 to 163 in b7100a6
The text was updated successfully, but these errors were encountered: