Description
I have an .onnx model which I would like to convert to a .trt engine. In the beginning I got an error similar to the one described in this issue.
But after sanitisation of the model using the command:
./bin/polygraphy surgeon sanitize --fold-constants --no-shape-inference --save-external-data=data_small modelIn.onnx -o modelOut.onnx
I get a different error:
[07/08/2022-16:00:50] [TRT] [E] [shuffleNode.cpp::lowerParams::269] Error Code 4: Internal Error (Reshape_2573: second input must have length <= Dims::MAX_DIMS: length was 9)
[07/08/2022-16:00:50] [TRT] [E] ModelImporter.cpp:773: While parsing node number 708 [Reshape -> "onnx::Transpose_4140"]:
[07/08/2022-16:00:50] [TRT] [E] ModelImporter.cpp:774: --- Begin node ---
[07/08/2022-16:00:50] [TRT] [E] ModelImporter.cpp:775: input: "onnx::Reshape_4121"
input: "onnx::Reshape_4139"
output: "onnx::Transpose_4140"
name: "Reshape_2573"
op_type: "Reshape"
[07/08/2022-16:00:50] [TRT] [E] ModelImporter.cpp:776: --- End node ---
[07/08/2022-16:00:50] [TRT] [E] ModelImporter.cpp:779: ERROR: ModelImporter.cpp:180 In function parseGraph:
[6] Invalid Node - Reshape_2573
[shuffleNode.cpp::lowerParams::269] Error Code 4: Internal Error (Reshape_2573: second input must have length <= Dims::MAX_DIMS: length was 9)
[E] In node 708 (parseGraph): INVALID_NODE: Invalid Node - Reshape_2573
[shuffleNode.cpp::lowerParams::269] Error Code 4: Internal Error (Reshape_2573: second input must have length <= Dims::MAX_DIMS: length was 9)
[!] Could not parse ONNX correctly
Environment
TensorRT Version: 8.4.1.5
GPU Type: Nvidia
Nvidia Driver Version:
CUDA Version: 11.5
CUDNN Version:
Operating System + Version: Ubuntu 20.04
Python Version (if applicable): 3.7
TensorFlow Version (if applicable):
PyTorch Version (if applicable): 1.10.1
Baremetal or Container (if container which image + tag):
Any ideas please?
Thank you,
Elias.