TrojanXu / yolov5-tensorrt

A tensorrt implementation of yolov5: https://github.com/ultralytics/yolov5
Apache License 2.0
191 stars 46 forks source link

onnx file error #12

Closed aitck closed 3 years ago

aitck commented 4 years ago

ERROR: Failed to parse the ONNX file. In node 0 (importModel): INVALID_GRAPH: Assertion failed: tensors.count(input_name) Traceback (most recent call last): File "main.py", line 212, in trt_result = profile_trt(build_engine(onnx_path, using_half), batch_size, 10, 100) File "main.py", line 118, in profile_trt assert(engine is not None) AssertionError

TrojanXu commented 4 years ago

Looks like the exported onnx model is invalid. Do you get any other error information?

pkraison commented 4 years ago

ERROR: Failed to parse the ONNX file. In node 0 (importModel): INVALID_GRAPH: Assertion failed: tensors.count(input_name) Traceback (most recent call last): File "main.py", line 212, in trt_result = profile_trt(build_engine(onnx_path, using_half), batch_size, 10, 100) File "main.py", line 118, in profile_trt assert(engine is not None) AssertionError check whether you're using right yaml and weights

aitck commented 4 years ago

@TrojanXu No other error information, maybe this is a version error of tensorrt, my tensorrt version is 6.0

pkraison commented 4 years ago

@TrojanXu No other error information, maybe this is a version error of tensorrt, my tensorrt version is 6.0

Yes, I think you should upgrade it to 7/7+

TrojanXu commented 4 years ago

Yes, try 7/7+ please