-
Notifications
You must be signed in to change notification settings - Fork 75
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
DequantizeLinear.py can't compile layer when x_scale_rank == 1 #733
Comments
Alright I got it to create the saved model as I commented out the lines:
Perhaps there could be a check around it if the shapes of the subded_tensor and x_scale are compatible for multiplication before doing this reshaping as it doesn't seem to be necessary in my case. However I am getting a different issue that I wonder if this is related?
|
What's Changed
Full Changelog: 1.26.6...1.26.7 |
Issue Type
Others
OS
Linux
onnx2tf version number
1.22.3
onnx version number
1.17.0
onnxruntime version number
1.20.0
onnxsim (onnx_simplifier) version number
0.4.36
tensorflow version number
2.18.0
Download URL for ONNX
https://drive.google.com/file/d/1V67C1yzkjCejLkR5vykay3MTsN7BXFPH/view?usp=drivesdk
Parameter Replacement JSON
None
Description
Hello to those involved (let me know if the link to the file is broken)
The problem is happening with this simple part of the model:
`class Conv(nn.Module):
"""Standard convolution with args(ch_in, ch_out, kernel, stride, padding, groups, dilation, activation)."""
It is fused together and wrapped around the model is the Dequant and Quat layers to do QAT.
These are all the translated layers for this model:
The issue arrises with DequantizeLinear_1_output_0
These are it's input layers:
Because Constant_2 has the shape it has, the program tries to reshape Constant_3_output_0 (a single value) to be [1, 1, 1, 3] which is impossible
I know this should be possible as I am able to use onnx2tf to compile and translate the model without doing quantization (no QAT) and the onnx model I can run inference on.
This is the command I run to execute onnx2tf (I have tried it in python script too and it's the same result)
Any help would be greatly appreciated :) Thank you in advance.
The text was updated successfully, but these errors were encountered: