I’m trying to convert an onnx model with trtexec and have the following error. I already tried using opset 11 when converting my original tensorflow model, same error with default opset.
hers the output:
[10/20/2025-11:04:22] [E] [TRT] ModelImporter.cpp:948: While parsing node number 250 [Resize -> "Resize__1134:0"]:
[10/20/2025-11:04:22] [E] [TRT] ModelImporter.cpp:950: --- Begin node ---
input: "StatefulPartitionedCall/model/ssh_c3_lateral_relu/Relu:0"
input: "const_empty_float__1126"
input: "const_empty_float__1126"
input: "Concat__1133:0"
output: "Resize__1134:0"
name: "Resize__1134"
op_type: "Resize"
attribute {
name: "coordinate_transformation_mode"
s: "tf_half_pixel_for_nn"
type: STRING
}
attribute {
name: "exclude_outside"
i: 0
type: INT
}
attribute {
name: "mode"
s: "nearest"
type: STRING
}
attribute {
name: "nearest_mode"
s: "round_prefer_floor"
type: STRING
}
domain: ""
[10/20/2025-11:04:22] [E] [TRT] ModelImporter.cpp:951: --- End node ---
[10/20/2025-11:04:22] [E] [TRT] ModelImporter.cpp:953: ERROR: onnxOpImporters.cpp:4611 In function importResize:
[6] Assertion failed: (static_cast<int32_t>(scalesVec.size()) == inputRank): The shape of weights must align with input data. Length of scales = 0, rank of input = 4.
[10/20/2025-11:04:22] [E] Failed to parse onnx file
[10/20/2025-11:04:22] [I] Finished parsing network model. Parse time: 0.378207
[10/20/2025-11:04:22] [E] Parsing model failed
[10/20/2025-11:04:22] [E] Failed to create engine from model or file.
[10/20/2025-11:04:22] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v100300] # trtexec --onnx=retina_modified_11.onnx --saveEngine=retina.trt --verbose --skipInference
Thanks in advance