-
Notifications
You must be signed in to change notification settings - Fork 514
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
Use convert_attribute=True by default for onnx.save #1738
Conversation
I suspect the reason why we have constant is because the integer value of the weights is computed at runtime but the original weights are never "replaced" with their integer counterparts. As far as ONNX export is concerned, those weights are constant values that are not part of the original model and they have no relations with the original weights. In any case, thanks for fixing this! |
I am not sure how torchscript -> onnx decides what is |
Getting
|
Merging as tests pass. |
* use convert_attribute=True by default for onnx.save * leave some constants in the model.onnx
As per title, see https://github.com/onnx/onnx/blob/b48d763a2d22574540f51b6bc5ce1a537fb65024/onnx/__init__.py#L310-L312
Have this as
False
may raiseValueError: The proto size is larger than the 2 GB limit. Please use save_as_external_data to save tensors separately from the model file.
despitesave_as_external_data=True
.Related: onnx/onnx#5949
We did not have errors previously as weights are
Initializer
s, but Brevitas is using (not sure why)Constant
for weights cc @Giuseppe5