GithubHelp home page GithubHelp logo

Comments (3)

justinchuby avatar justinchuby commented on June 3, 2024

@onnx/sig-operators

from onnx.

gramalingam avatar gramalingam commented on June 3, 2024

Good question. Looking at the onnx shape inference implementation, it computes the complete products (not skipping the forwarded dimensions). Hence, it will not be able to infer an output dimension and will flag this as an error here.

However, the more general interpretation could be useful in some situations, I guess ... it may be worth investigating whether backend implementations support it.

Do you see any examples/models where this will be useful? If so, it may be worth updating the spec to allow it.

from onnx.

ArchRobison avatar ArchRobison commented on June 3, 2024

It seems to be useful for dealing with batch dimensions that might be zero. For example, reshaping from [n,a,b] to [0,-1] where n is the batch dimension.

We (Nvidia TensorRT group) ran into the issue with fasterrcnn_resnet50_fpn.onnx (I think it's derived from here)> and accidentally fed it random data. I'm guessing there's some kind of internal batch dimension there, with a data-dependent length.

On the other hand, the "forwarding 0" is dangerous with networks that contain empty tensors, so there's much to be said for just discouraging "forwarding 0", even if it helps the use of wildcard -1. In retrospect, "forwarding -2" would have been a much better design, but Caffe chose 0.

from onnx.

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.