Giter Club home page Giter Club logo

Comments (3)

skottmckay avatar skottmckay commented on May 27, 2024

Reshape can only change the shape of the data. It does not create/destroy data.

In both cases the input to the Reshape node has no data as one of the dimensions is 0. So we can't 'reshape' no data to data with 1 element.

Most likely part of your model has some sort of selection logic, and nothing was selected, leading to a dimension with a value of 0.

It's also slightly unusual to be using Reshape with a target shape of {1}. Squeeze may be an alternative option as it would handle dims with a value of zero as it removes dimensions with a value of 1.

from onnxruntime.

Priyanshu88 avatar Priyanshu88 commented on May 27, 2024

Reshape can only change the shape of the data. It does not create/destroy data.

In both cases the input to the Reshape node has no data as one of the dimensions is 0. So we can't 'reshape' no data to data with 1 element.

Most likely part of your model has some sort of selection logic, and nothing was selected, leading to a dimension with a value of 0.

It's also slightly unusual to be using Reshape with a target shape of {1}. Squeeze may be an alternative option as it would handle dims with a value of zero as it removes dimensions with a value of 1.

But why is this different for two different batch sizes?
Any possible solution will work that would handle my case of conversion, also did you take a look at onnx config specific to model and it's expected behavior ? let me know any modification if you can provide.

from onnxruntime.

github-actions avatar github-actions commented on May 27, 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.