onnx-tensorrt
onnx-tensorrt copied to clipboard
In function importTopK: [8] Assertion failed: inputs.at(1).is_weights()
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?
Do you solve it? By how
@rgc183 did you solve it?
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
I'm also very interested in this.
@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.
Hi all, TensorRT unfortunately only supports constant values for
kin 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.