dlunion / tensorRTIntegrate

TensorRT ONNX Plugin、Inference、Compile
465 stars 114 forks source link

libprotobuf FATAL #36

Closed StrongerzZ closed 4 years ago

StrongerzZ commented 4 years ago

我在https://github.com/onnx/models 下载了SSD的onnx文件,并用center_net_coco2x_dcn的example进行编译,总是报错:

W[2020-08-14 11:54:36:d:\nndl_pytorch\tensorrtintegrate-master\src\examples\center_net_coco2x_dcn.cpp:121]:onnx to trtmodel... W[2020-08-14 11:54:43:d:\nndl_pytorch\tensorrtintegrate-master\src\builder\trt_builder.cpp:96]:Build FP32 trtmodel. WARNING: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32. Successfully casted down to INT32. [libprotobuf FATAL d:\nndl_pytorch\tensorrtintegrate-master\lean\protobuf3.11.4\include\google\protobuf\repeated_field.h:1537] CHECK failed: (index) < (currentsize):

我也尝试了将YOLOv5s进行onnx导出,同样发生了protobuf错误,还有一个slice操作参数不能为0的错误。

E[2020-08-14 12:17:59:d:\nndl_pytorch\tensorrtintegrate-master\src\builder\trt_builder.cpp:32]:NVInfer ERROR: (Unnamed Layer 0) [Slice]: slice size must be positive, size = [3,0,640] E[2020-08-14 12:17:59:d:\nndl_pytorch\tensorrtintegrate-master\src\builder\trt_builder.cpp:32]:NVInfer ERROR: (Unnamed Layer 0) [Slice]: slice size must be positive, size = [3,0,640] [libprotobuf FATAL d:\nndl_pytorch\tensorrtintegrate-master\lean\protobuf3.11.4\include\google\protobuf\repeated_field.h:1537] CHECK failed: (index) < (currentsize):

想问一下应该修改哪些地方避免上述错误,还有哪些地方需要更改才能任意跑通一个自己导出的onnx模型。

可能问的有点大,我是小白,希望大佬们理解一下:)

czy112 commented 4 years ago

请问你有解决吗?我也遇到同样的问题了

hopef commented 4 years ago

你导出一个分类器,很容易就成功的