I trained a model using tensorflow (v2) detection API.
Then I exported to ONNX.
I then tried to convert it to tensorrt on NVIDIA Jetson.
This failed due to tensorrt not recognising NonMaximumSuppresion.
Finally I installed tensorrt v18.104.22.168, tensorrt OSS and the latest onnx-tensorrt on a separate machine.
After successfully building, I tried converting the model to TRT.
Since then it consistently gives this error.
Input filename: /content/nvidia/face-model2-float-onnxsim.onnx
ONNX IR version: 0.0.7
Opset version: 11
Model version: 0
WARNING: ONNX model has a newer ir_version (0.0.7) than this parser was built against (0.0.6).
[2021-07-26 14:57:16 INFO] [MemUsageChange] Init CUDA: CPU +0, GPU +0, now: CPU 0, GPU 254 (MiB)
[2021-07-26 14:57:16 WARNING] /content/nvidia/onnx-tensorrt/onnx2trt_utils.cpp:364: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[2021-07-26 14:57:16 WARNING] /content/nvidia/onnx-tensorrt/onnx2trt_utils.cpp:390: One or more weights outside the range of INT32 was clamped
While parsing node number 255 [TopK → “StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/SortByField/TopKV2:0”]:
— Begin node —
— End node —
ERROR: /content/nvidia/onnx-tensorrt/builtin_op_importers.cpp:4293 In function importTopK:
 Assertion failed: (inputs.at(1).is_weights()) && “This version of TensorRT only supports input K as an initializer.”
I have used onnx-simplifier yet it the error persists. I have also used polygraphy surgeon all to no avail.
TensorRT Version: * TensorRT 22.214.171.124
Nvidia Driver Version: Driver Version: 460.32.03
CUDA Version: 11.2
CUDNN Version: CUDNN_MAJOR 7
Operating System + Version: Ubuntu 18.04.5 LTS
Python Version (if applicable): 3.7.11
TensorFlow Version (if applicable): 2.5.0
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):
Attached is the notebook I used for the experiments, also contained are the converted models.
- Exact steps/commands to build your repro
- Exact steps/commands to run your repro
- Full traceback of errors encountered
Your help will be most appreciated.