Hello guys, I am trying to convert a ssd_inception model that we trained on our own dataset consisting of 1 class(excluding background) to trt. When trying to convert it to trt8 from uff we receive the following error messages depending on the uff config used for the conversion of .pb to .uff.
Code used for conversation is taken from TensorRT/samples/python/uff_ssd at main · NVIDIA/TensorRT · GitHub
Using old UFF config that was valid for trt6
TensorRT inference engine settings:
* Inference precision - DataType.HALF
* Max batch size - 1
[TensorRT] INTERNAL ERROR: Assertion failed: mConcatAxisID == 1 || mConcatAxisID == 2 || mConcatAxisID == 3
flattenConcat.cpp:40```
Or using the newest uff config located in TensorRT/model.py at main · NVIDIA/TensorRT · GitHub
TensorRT inference engine settings:
* Inference precision - DataType.HALF
* Max batch size - 1
[TensorRT] ERROR: 3: [layers.h::setAxis::562] Error Code 3: Internal Error (Parameter check failed at: /_src/build/cuda-10.2/8.2/aarch64/release/optimizer/api/layers.h::setAxis::562, condition: axis >= 0 && axis < Dims::MAX_DIMS
)
[TensorRT] ERROR: 4: [layers.cpp::estimateOutputDims::1856] Error Code 4: Internal Error (Concatenate/concat: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at index 1. Input 0 shape: [2,7668,1], Input 1 shape: [2,4332,1])
[TensorRT] ERROR: 4: [layers.cpp::estimateOutputDims::1856] Error Code 4: Internal Error (Concatenate/concat: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at index 1. Input 0 shape: [2,7668,1], Input 1 shape: [2,4332,1])
[TensorRT] ERROR: 4: [layers.cpp::estimateOutputDims::1856] Error Code 4: Internal Error (Concatenate/concat: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at index 1. Input 0 shape: [2,7668,1], Input 1 shape: [2,4332,1])
[TensorRT] ERROR: 4: [layers.cpp::estimateOutputDims::1856] Error Code 4: Internal Error (Concatenate/concat: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at index 1. Input 0 shape: [2,7668,1], Input 1 shape: [2,4332,1])
[TensorRT] ERROR: 4: [layers.cpp::estimateOutputDims::1856] Error Code 4: Internal Error (Concatenate/concat: all concat input tensors must have the same dimensions except on the concatenation axis (0), but dimensions mismatched at index 1. Input 0 shape: [2,7668,1], Input 1 shape: [2,4332,1])
[TensorRT] ERROR: UffParser: Parser error: BoxPredictor_0/ClassPredictor/BiasAdd: The input to the Scale Layer is required to have a minimum of 3 dimensions.
Building TensorRT engine. This may take few minutes.
[TensorRT] ERROR: 4: [network.cpp::validate::2411] Error Code 4: Internal Error (Network must have at least one output)
[TensorRT] ERROR: 2: [builder.cpp::buildSerializedNetwork::417] Error Code 2: Internal Error (Assertion enginePtr != nullptr failed.)
Traceback (most recent call last):
File "detect_objects.py", line 193, in <module>
main()
File "detect_objects.py", line 167, in main
batch_size=args.max_batch_size)
File "/home/jetson/convert_uff/uff_ssd/utils/inference_trt.py", line 82, in __init__
batch_size=batch_size)
File "/home/jetson/convert_uff/uff_ssd/utils/engine.py", line 98, in build_engine
return runtime.deserialize_cuda_engine(plan)
TypeError: deserialize_cuda_engine(): incompatible function arguments. The following argument types are supported:
1. (self: tensorrt.tensorrt.Runtime, serialized_engine: buffer) -> tensorrt.tensorrt.ICudaEngine
Invoked with: <tensorrt.tensorrt.Runtime object at 0x7f7cf7dab0>, None
If you need the .pb and .uff files to debug this further please let me know and I will provide you them privately.
Help with getting the model converted to a trt8 compatible engine would be much appreciated!