SPIGA icon indicating copy to clipboard operation
SPIGA copied to clipboard

Unable to generate an ONNX that works in ONNXRuntime

Open edmosRovi opened this issue 1 year ago • 5 comments

Hi,

I tried to generate the ONNX model as in https://github.com/andresprados/SPIGA/issues/3 but when using it with ONNXRuntime I can't get it to work, because I get this failure:

"Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from model.onnx failed:Node (/Squeeze) Op (Squeeze) [ShapeInferenceError] Dimension of input 1 must be 1 instead of 2"

Any idea what is going on?

Thanks.

edmosRovi avatar Mar 22 '23 14:03 edmosRovi

hello, did you solve this problem?

wangwei-630 avatar May 23 '23 06:05 wangwei-630

Hello. No, not yet resolved.

edmosRovi avatar May 23 '23 06:05 edmosRovi

Anyone managed to solve this issue? Really need to speed up the spiga using onxx :(

zhenyi1998 avatar Nov 08 '23 09:11 zhenyi1998

Hello. No, not yet resolved.

Please,Now are you solved?

naonao-beibei avatar Nov 21 '23 06:11 naonao-beibei

Hello,

I've been having trouble converting this model to ONNX, but I think I've narrowed down the problem to line 189 of the spiga/model/spiga.py file. In this line, the tensor is reshaped, which causes problems during the conversion to ONNX. This is because ONNX needs to know the exact shape of each variable (tensor) in order to create a graph. The reshape operation prevents ONNX from knowing the exact shape of the tensor, which causes the conversion to fail.

Mohammadakhavan75 avatar Dec 09 '23 14:12 Mohammadakhavan75