faedtodd / Tensorrt-Yolov3-tiny

darknet2onnx2tensorrt
26 stars 10 forks source link

[TensorRT] ERROR: (Unnamed Layer* 38) [Concatenation]: all concat input tensors must have the same dimensions except on the concatenation axis #4

Open barzan-hayati opened 5 years ago

barzan-hayati commented 5 years ago

I'm trying to convert onnx file created by your code to trt file using onnx_to_tensorrt.py, but this error has happened.

Loading ONNX file from path Tiny_YOLOv3.onnx...
Beginning ONNX file parsing
[TensorRT] ERROR: (Unnamed Layer* 38) [Concatenation]: all concat input tensors must have the same dimensions except on the concatenation axis
Completed parsing of ONNX file
Building an engine from file Tiny_YOLOv3.onnx; this may take a while...
[TensorRT] ERROR: Network must have at least one output
Completed creating Engine
Traceback (most recent call last):
  File "ONNX2TRT.py", line 235, in <module>
    main()
  File "ONNX2TRT.py", line 192, in main
    with get_engine(onnx_file_path, batch_size, fp16_on, engine_file_path) as engine, engine.create_execution_context() as context:
  File "ONNX2TRT.py", line 133, in get_engine
    return build_engine()
  File "ONNX2TRT.py", line 124, in build_engine
    f.write(engine.serialize())
AttributeError: 'NoneType' object has no attribute 'serialize'

System information: Ubuntu 18.04 CUDA: 10.0 TensorRT:6

sathees07 commented 4 years ago

I too get the same error. If you solved this error, please give me a solution.