Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In function importTopK: [8] Assertion failed: inputs.at(1).is_weights() #455

Open
rgc183 opened this issue May 5, 2020 · 6 comments
Open
Labels
enhancement New feature or request triaged Issue has been triaged by maintainers

Comments

@rgc183
Copy link

rgc183 commented May 5, 2020

from https://github.com/onnx/onnx/blob/master/docs/Operators.md#topk second input seems to be 1-D tensor with single value, however, importer for TopK expects second input to be weight and crashes.

Whats the workaround for this?

@KevenLee
Copy link

Do you solve it? By how

@simutisernestas
Copy link

@rgc183 did you solve it?

@kevinch-nv kevinch-nv added enhancement New feature or request triaged Issue has been triaged by maintainers labels Dec 28, 2020
@kevinch-nv
Copy link
Collaborator

Hi all, TensorRT unfortunately only supports constant values for k in its TopK layer.

Are the K values in the models actually dynamic? Perhaps they can be constant-folded using the following library: https://github.com/daquexian/onnx-simplifier

@hyperfraise
Copy link

I'm also very interested in this.

@RunningLeon
Copy link

@kevinch-nv
Hi, I'm facing the same problem and K of TopK should be dynamic if we feed dynamic input into a model using TensorRT.
And in ONNXRuntime the K is dynamic.
BTW, is there any plan on this issue?
Thanks.

@wkl2013DeepVision
Copy link

Hi all, TensorRT unfortunately only supports constant values for k in its TopK layer.

Are the K values in the models actually dynamic? Perhaps they can be constant-folded using the following library: https://github.com/daquexian/onnx-simplifier

found your many answers are not the quesqtions's answers., please seriously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

7 participants