I was trying to convert an onnx model to tensor engine file in a docker container of tensorrt (docker pull nvcr.io/nvidia/tensorrt:20.03-py3
)
and got following error: Assertion failed: scales.is_weights() && “Resize scales must be an initializer!”
Can you please guide what’s the issue here?
Environment
TensorRT Version: 7.1 CUDA Version: 10.2 Operating System + Version: Ubuntu 18.04
Hi,
Request you to share the ONNX model and the script if not shared already so that we can assist you better.
Alongside you can try few things:
validating your model with the below snippet
check_model.py
import sys
import onnx
filename = yourONNXmodel
model = onnx.load(filename)
onnx.checker.check_model(model).
2) Try running your model with trtexec command. https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/trtexec
In case you are still facing issue, request you to share the trtexec “”–verbose"" log for further debugging
Thanks!
I met the same error when I converted my yolov5x fp16 to trt but not while yolov5x fp32, here is my model file and pytorch version: 1.12, cuda 11…3 trt version 8.0.1.6