Description
Hi,
I’m trying to convert a ssd onnx model to trt with onnx2trt exection file.
Because it has NonMaxSuppresion in the model, I made a plugin which inheritances IPluginV2DynamicExt to support dynamic shape.
After NonMaxSuppression it was abort at TopK layer and gives the message as below:
While parsing node number 498 [TopK -> “TopK_717”]:
ERROR: /home/u5393118/TensorRT/parsers/onnx/builtin_op_importers.cpp:3283 In function importTopK:
[8] Assertion failed: inputs.at(1).is_weights()
I’m not sure if modify TopK op will solve this issue or I shouldn’t modify it since it was built in op.
Or other solution is recommended?
Thank you.
Environment
TensorRT Version : 7.0.0-1
GPU Type : Tesla V100
Nvidia Driver Version : 450.51.05
CUDA Version : 11.0
CUDNN Version :
Operating System + Version : ubuntu 18.04
Python Version (if applicable) : 3.6.9
TensorFlow Version (if applicable) :
PyTorch Version (if applicable) :
Baremetal or Container (if container which image + tag) :
Relevant Files
ONNX model is downloaded from https://github.com/onnx/models/tree/master/vision/object_detection_segmentation/ssd
NonMaxSuppressionPlugin.cpp (7.4 KB) CMakeLists.txt (732 Bytes) NonMaxSuppressionPlugin.h (3.7 KB) builtin_op_importers.cpp (165.4 KB)
Steps To Reproduce
- In plugin folder mkdir NonMaxSuppressionPlugin
- Add file CMakeList.txt and NonMaxSuppressionPlugin.cpp and NonMaxSuppressionPlugin.h
- Modify parsers/onnx/builtin_op_importers.cpp
- Add initializePlugin< nvinfer1::plugin::NonMaxSuppressionPluginCreator >(logger, libNamespace) in InferPlugin.cpp
- Add NonMaxSuppression in CMakeList.txt in TensorRT/Plugin
- Run make and make install in TensorRT/build/
- Rebuild libnvinfer.so and libnvonnxparser.so
- Copy .so file in 7 to /usr/lib/x86_64-linux-gnu
- Change to bin/ run onnx2trt ssd-10.onnx -o ssd.trt