Git Product home page Git Product logo

Comments (7)

yuslepukhin avatar yuslepukhin commented on August 17, 2024

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.

MithrilMan avatar MithrilMan commented on August 17, 2024

@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.

yuslepukhin avatar yuslepukhin commented on August 17, 2024

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.

MithrilMan avatar MithrilMan commented on August 17, 2024

Thanks, unluckily I'm using the C# version of onnxruntime so I can't tap into the cc

from onnxruntime.

yuslepukhin avatar yuslepukhin commented on August 17, 2024

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.

MithrilMan avatar MithrilMan commented on August 17, 2024

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?

image

image

Where can i found (updated) technical documentation about onnxruntime?
I'd like to dig into

from onnxruntime.

github-actions avatar github-actions commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.