-
Notifications
You must be signed in to change notification settings - Fork 74
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
When Onnx Matmul inputs have different dimension #133
Comments
It can be avoided by a simple transposition of dimensions. {
"format_version": 1,
"operations": [
{
"op_name": "MatMul_8",
"param_target": "inputs",
"param_name": "input.35",
"pre_process_transpose_perm": [0,2,1]
}
]
} |
@PINTO0309 san, thank you a lot for your help. Another error happened in
Successful job's log is attached. success_log.txt I see one more MatMul ops having shape [1, 256, 2], [2, 66] as inputs. And I wonder why this layer does not throw an error like
|
For you to properly understand what is going on here, you need to understand the inner workings of the tool. It is not easy to explain, as it involves many fairly complex operations. I will only list the main points in bullet points.
The tool is designed with the assumption that we humans accept that we may lose track of channel locations in the presence of special transpositions. Therefore, the JSON file is a mechanism for the person who designed the model to tell the tool what channel placement is in the intermediate structural part of the model. |
Thank you for your response. Understood. |
This is only a temporary fix, but your model no longer produces conversion errors without using JSON, and accuracy errors no longer occur.
|
Issue Type
Others
onnx2tf version number
1.5.18
onnx version number
1.13.0
tensorflow version number
2.10.0
Download URL for ONNX
test_model.zip
Parameter Replacement JSON
Not used
Description
Matmul
ops are not equal. Error log is attached. error_log.txtparam_replacement.json
. But For Matmul ops, only axis transposing is suported, so I am not able to add dimension on the input.We are thinking if we can add one more dimension in
input_name.2: onnx::MatMul_73
to[1, 66, 2]
, it can be resolved.The text was updated successfully, but these errors were encountered: