ImportError onnxparser

Hello,

I am getting this error while running the import tensorrt.legacy as trt

Awaiting for your response

File “model2trt.py”, line 51, in onnx_2_float32
apex = onnxparser.create_onnxconfig()
AttributeError: type object ‘onnxparser’ has no attribute ‘create_onnxconfig’

Hi,

Looks like you are using a TRT 4 API that has been deprecated for some time now. Engineering recommends migrating to TRT6.
Please refer to following link for ONNX parser sample:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-sample-support-guide/index.html#introductory_parser_samples

Thanks