nbigaouette / onnxruntime-rs

Rust wrapper for Microsoft's ONNX Runtime (version 1.8)
Apache License 2.0
276 stars 99 forks source link

`InvalidDimensions` error when Tensor is numeric data #108

Open Hiroshiba opened 2 years ago

Hiroshiba commented 2 years ago

I am getting an InvalidDimensions error when num_dims==0 in the code here. https://github.com/nbigaouette/onnxruntime-rs/blob/88c6bab938f278c92b90ec4b43c40f47debb9fa6/onnxruntime/src/session.rs#L582-L584

If Tensor is just numeric data, num_dims==0 here. So I think the correct behavior would be to not have the assert here.

I would like to know if there is another code that causes the problem.