-
Notifications
You must be signed in to change notification settings - Fork 428
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
For some Const node: "initializer shape is inconsistent" #83
Comments
I remember that there was some issue with caffe2 and winml that some tensor ops don't work if you use a scalar but they are perfectly happy if you pass [scalar] and I think we intentionally made a change to use [scalar] for that reason. Let me look at this again, it is some time ago and I don't know if caffe2 still needs this. We could maybe ifdef this for the caffe2 runtime ... this target thing was meant to allow runtime specific workarounds.
|
Thanks @guschmue for the reply, while this issue should be in tf-graph->onnx conversion stage, not yet hit the caffe2 runtime. |
Do you mean let me comment the https://github.com/onnx/tensorflow-onnx/blob/master/tf2onnx/graph.py#L421 with check "if ctx.is_target(TARGET_CAFFE2):"? |
void my comment ,,, not the same. I'll look at it today. |
I just comment the L421 check to unblock the model conversion, so maybe we can consider to loose the shape==dim check for some special case. anyway, we can discuss once you get better context later. :) |
sure |
not having this issue recently, close this unless we got this failure again. |
The problematic node looks as below:
https://github.com/onnx/tensorflow-onnx/blob/master/tf2onnx/graph.py#L421, in runtime, the values are:
list(shape) is [0]
initializer.dims is [1]
Since the above constant is a scalar, I think initializer.dims might get wrong?
initializer.dims is created in add_initializer, which is called by https://github.com/onnx/tensorflow-onnx/blob/master/tf2onnx/tfonnx.py#L206, where when i print(tensor), and print(type(tensor)), it shows
Any thoughts? @guschmue
-------------------paste the good const node as compassion in below ------------------------------
The other hand, example const nodes that works well
The text was updated successfully, but these errors were encountered: