Comments (7)
You have a model with dynamic dimensions. This means that dimension can vary, typically due to the input shape.
Often times that variable dimension affects output shapes with cascading effect downstream which means you have to make other nodes input and outputs have variable dimensions.
It is not always easy to make that work in all cases.
In this case Reshape takes data
input with the first and the last dimensions being dynamic, meaning you have multiple variable dimensions.
The error message indicates that at least one dimension has a value of zero, but the attribute allow_zero
is false(0) according to the image you posted.
To debug this, you have a couple of options. 1) Visually trace the data flow (it is actually possible, but not always) and attempt to compute where the zero is coming from and whether it should be there or should Reshape
allow it 2) Rebuild from source (C++) and enable some debugging facilities and dump the input/output shapes or store it in the SQL Light database.
from onnxruntime.
@yuslepukhin Thanks for the feedback, the model is a https://github.com/rhasspy/piper model that was probably converted by their converter from a ckpt to onnx model, so you mean that a problem could be in the export script?
What I found strange is that with onnxruntime v1.16 I didn't had these errors
This is the code I suppose was used to convert that model: https://github.com/rhasspy/piper/blob/master/src/python/piper_train/export_onnx.py
About the debugging, can you visually trace interactively? because there are tons of nodes, would be nice to be able to have a way to put a breakpoint and then inspecting the call stack :)
from onnxruntime.
It may be a converter issue, may be the original model issue.
The call stack would not help you as it is virtually the same when running any kernel.
You can put a breakpoint and stop when a particular node is executing, no problem.
What is of interest if the input shape and how shape is changing from node to node and how one arrives to the dimension value of zero.
You insert some code here: https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/framework/sequential_executor.cc#L452
To interrogate the kernel inputs/outputs and print shapes.
from onnxruntime.
Thanks, unluckily I'm using the C# version of onnxruntime so I can't tap into the cc
from onnxruntime.
Thanks, unluckily I'm using the C# version of onnxruntime so I can't tap into the cc
There are no different versions of onnxruntime. There is only one. C# along with different languages are just interfaces to consume onnxruntime.
from onnxruntime.
yes I mean I'm consuming C# nuget packages that are wrappers around native onnxruntime so I can't put a breakpoint on .cc code, or at least I think so, I know nuget can include symbols but I thought they were only on .net code, would be nice to be able to put breakpoints on .cc too.
Am I wrong?
Where can i found (updated) technical documentation about onnxruntime?
I'd like to dig into
from onnxruntime.
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.
from onnxruntime.
Related Issues (20)
- [cuda ep] Squeeze node fails when axes is not provided
- [Mobile] .NET MAUI and OnnxRuntime integration on iPhone 11 - iOS 17.5.1 with Hot Restart deployment/debugging - Loading InferenceSession results in 'The type initializer for 'Microsoft.ML.OnnxRuntime.NativeMethods' threw an exception.' HOT 8
- Same Model Hash Code Issue from different models
- Memory Leak in Onnx Session Release [Web]
- [Build] fail to build `rel-1.19.0` vs CUDA 12.6 on Windows HOT 4
- [DO NOT UNPIN] ORT 1.19 release candidates available for testing HOT 2
- [Mobile] Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported
- FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcublasLt.so.11: cannot open shared object file: No such file or directory HOT 2
- device_id is not work
- [Performance] Inference time discrepancy when using TorchScript vs ONNX exported model
- onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : CopyTensorAsync is not implemented HOT 3
- [Build] ONNXRuntime QNN execution provider dlls are not copied to target
- [Feature Request] Enable --use-extensions for pre built releases
- Inference session with 'optimized_model_filepath' expands HardSwish operator into atomic operators
- [Performance] SetIntraOpNumThreads not take effect HOT 2
- [Performance] pytorch quantize_qat model export to onnx, insert a transpose layer befor and after the conv layers HOT 5
- [Web] model can run under python env both cpu and cuda, but cannot run under webGPU HOT 6
- 1.18.1 regression: not working with Emgu.CV <= 4.8.0 HOT 2
- [Build] Access Violation error on using 'new InferenceSession(filepath)' in 1.18.1
- Why is CoreMLExecution an Objective-C class HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onnxruntime.