Closed CallmeZhangChenchen closed 4 years ago
TensorRT6上就可以跑
恩,我也试了,TensorRT5跟TensorRT6都可以跑,但是TensorRT7上改了onnx模型的使用方式
先关了。我慢慢解决吧!
Solution is :
old code->
network = builder.create_network()
new code->
explicit_batch = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)
network = builder.create_network(explicit_batch)
在NX上,只有最新的jetpack ,由于TensorRT的版本为7.0.0.11, ,
face_detection中的predict_tensorrt.py跑不通啦。
Error:
INFO:root:Init engine from ONNX file. INFO:root:Create TensorRT builder. INFO:root:Create TensorRT network. INFO:root:Create TensorRT ONNX parser. ERROR:root:Errors occur while parsing the ONNX file! Assertion failed: !_importer_ctx.network()->hasImplicitBatchDimension() && "This version of the ONNX parser only supports TensorRT INetworkDefinitions with an explicit batch dimension. Please ensure the network was created using the EXPLICIT_BATCH NetworkDefinitionCreationFlag."