PaddlePaddle / Paddle-Lite

PaddlePaddle High Performance Deep Learning Inference Engine for Mobile and Edge (飞桨高性能深度学习端侧推理引擎)
https://www.paddlepaddle.org.cn/lite
Apache License 2.0
6.94k stars 1.61k forks source link

Check failed: (idx < BlocksSize()): 0!<0 idx >= blocks.size() Aborted (core dumped) #4717

Closed maunzec closed 3 years ago

maunzec commented 3 years ago

python D:/Work/Paddle/PaddleDetection/tools/export_model.py -c ppyolo_mobilenet_v3_large.yml -o weights=output/ppyolo_mobilenet_v3_large/model_final --output_dir=./inference_model D:\Work\Paddle\PaddleDetection\ppdet\core\workspace.py:118: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working isinstance(merge_dct[k], collections.Mapping)): D:\Python37\lib\site-packages\paddle\fluid\layers\math_op_patch.py:278: UserWarning: D:\Work\Paddle\PaddleDetection\ppdet\modeling\backbones\mobilenet_v3.py:228 The behavior of expression A B has been unified with elementwise_mul(X, Y, axis=-1) from Paddle 2.0. If your code works well in the older versions but crashes in this version, try to use elementwise_mul(X, Y, axis=0) instead of A B. This transitional warning will be dropped in the future. op_type, op_type, EXPRESSION_MAP[method_name])) 2020-11-11 10:49:46,771-INFO: Load categories from D:/Work/CYY_glj/data/glj-number/label_list.txt 2020-11-11 10:49:46,774-INFO: Export inference config file to ./inference_model\ppyolo_mobilenet_v3_large\infer_cfg.yml 2020-11-11 10:49:46,881-INFO: save_inference_model pruned unused feed variables im_id 2020-11-11 10:49:46,882-INFO: Export inference model to ./inference_model\ppyolo_mobilenet_v3_large, input: ['image', 'im_size'], output: ['multiclass_nms_0.tmp_0']...

在arm上用编译好的paddllite,

root@orangepi3:~/work/ppyolo_mobilenet_v3_large# paddle_lite_opt --param_file=model --model_file=params --valid_targets=arm --optimize_out_type=naive_buffer --optimize_out=model [I 11/11 4: 1:59.263 ...oot/paddle-lite/lite/core/device_info.cc:1065 Setup] ARM multiprocessors name: [I 11/11 4: 1:59.263 ...oot/paddle-lite/lite/core/device_info.cc:1066 Setup] ARM multiprocessors number: 4 [I 11/11 4: 1:59.263 ...oot/paddle-lite/lite/core/device_info.cc:1068 Setup] ARM multiprocessors ID: 0, max freq: 1488, min freq: 1488, cluster ID: 0, CPU ARCH: A53 [I 11/11 4: 1:59.263 ...oot/paddle-lite/lite/core/device_info.cc:1068 Setup] ARM multiprocessors ID: 1, max freq: 1488, min freq: 1488, cluster ID: 0, CPU ARCH: A53 [I 11/11 4: 1:59.263 ...oot/paddle-lite/lite/core/device_info.cc:1068 Setup] ARM multiprocessors ID: 2, max freq: 1488, min freq: 1488, cluster ID: 0, CPU ARCH: A53 [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1068 Setup] ARM multiprocessors ID: 3, max freq: 1488, min freq: 1488, cluster ID: 0, CPU ARCH: A53 [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1074 Setup] L1 DataCache size is: [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1076 Setup] 32 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1076 Setup] 32 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1076 Setup] 32 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1076 Setup] 32 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1078 Setup] L2 Cache size is: [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1080 Setup] 512 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1080 Setup] 512 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1080 Setup] 512 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1080 Setup] 512 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1082 Setup] L3 Cache size is: [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1084 Setup] 0 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1084 Setup] 0 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1084 Setup] 0 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1084 Setup] 0 KB [I 11/11 4: 1:59.264 ...oot/paddle-lite/lite/core/device_info.cc:1086 Setup] Total memory: 2027832KB [I 11/11 4: 1:59.319 /root/paddle-lite/lite/api/cxx_api.cc Build:262] Load model from file. [F 11/11 4: 1:59.361 ...ite/model_parser/general/program_desc.cc:29 GetBlockpaddle::lite::general::BlockDesc] Check failed: (idx < BlocksSize()): 0!<0 idx >= blocks.size() Aborted (core dumped)

https://github.com/PaddlePaddle/PaddleDetection/issues/1689PaddleDetection 也提问了

ysh329 commented 3 years ago

https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_linux.html

maunzec commented 3 years ago

我现在编译好whl了

maunzec commented 3 years ago

执行预测就显示Check failed: op: no Op found for hard_sigmoid Aborted (core dumped)

maunzec commented 3 years ago

图片

maunzec commented 3 years ago

一定要用c++ 试一试吗

ysh329 commented 3 years ago

执行预测就显示Check failed: op: no Op found for hard_sigmoid Aborted (core dumped)

为啥你要比编译whl包?直接编译opt就可以的,用opt,whl包我不太了解,不清楚whl包的情况……

maunzec commented 3 years ago

opt 编译不行啊。。不是98%爆内存,就是卡住,只能在x86上 ubuntu编译成功,opt其实已经没问题了。现在是运行不了模型

ysh329 commented 3 years ago

你要不试试下面这个,版本是2.6.3不知道是否可行(https://github.com/PaddlePaddle/Paddle-Lite/releases): image

库用这几个: image

ysh329 commented 3 years ago

用户20+天无回复了,关闭