Key error for Reshape when trying to convert ONNX model
See original GitHub issueDo you think this error occuring because the weights name is missing in the ONNX file or because the operation isn’t found?
I’m getting the right results if I load and run the model with ONNX runtime at least.
File "/home/richard/miniconda3/envs/3.9.13/lib/python3.9/site-packages/onnx2torch/converter.py", line 109, in convert
torch_module, onnx_mapping = converter(onnx_node, onnx_graph)
File "/home/richard/miniconda3/envs/3.9.13/lib/python3.9/site-packages/onnx2torch/node_converters/gemm.py", line 65, in _
weights = graph.initializers[weights_value_name]
KeyError: 'Reshape__2177:0'
Here is a link to the ONNX file if you want to try it yourself https://drive.google.com/file/d/1P_Bl7n2hbUoOhfMh_9UJfgK_N8kP_xjB/view?usp=sharing
I’m trying to make this model https://paperswithcode.com/paper/lit-zero-shot-transfer-with-locked-image-text easier to use for people
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
infer shape error when trying to convert tf model to onnx ...
I have made a simple model in tensorflow it seems to throwing a lot of errors when trying to convert to onnx format....
Read more >OpenVINO output key error after conversion from ONNX
I've converted a (modified) Darknet model to onnx, (tried opset 10 & 11) and then converting this onnx model into IR using this...
Read more >'Resize' Error in converting from ONNX model to keras ...
I am trying to convert an ONNX model to a Keras model using onnx2keras, so that I can implement this: ...
Read more >ONNX to TF-Lite Model Conversion
This tutorial describes how to convert an ONNX formatted model file into a format that can execute on an embedded device using Tensorflow-Lite...
Read more >IShuffleLayer applied to shape tensor must have 0 or 1 ...
I convert the model to onnx succefully, but when I try to convert onnx to ... must have 0 or 1 reshape dimensions:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your model corresponds to ONNX specification, the problem is on our side.
Bug has already been fixed, the fix will be published tomorrow.
Hi, Richard!
The problem is that our implementation is based on the assumption that
B
(Y = alpha * A' * B' + beta * C
) is ininitializers
, while yourLiB-B16B
network hasGEMM
operation whereB
is tensor, not initializer.We’ll fix it soon.