When trying to convert ONNX file into TensorRT engine file on my Jetson Nano I get following error:
ERROR: builtin_op_importers.cpp:3422 In function importResize:
 Assertion failed: scales.is_weights() && "Resize scales must be an initializer!"
|yolov5|error|[Builder] buildEngine() failure: could not parse ONNX model from file
Link you provided seems outdated and it uses TRT7 and I use TRT8.
Nevertheless, I tried all eight possible (and impossible) Opset versions (from ver.9 till 16) and still keep getting the same error regardless the opset I try ?
The same ONNX to TRT conversion script (which I have provided above) did successful job when I got the PT model from some other Pytorch version (don’t know which it was), but why my current 1.12.1 would generate problematic model whose ONNX cannot be successfully converted to TRT ??