Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yolov11转出的模型,用2.14的opt转到nb模型,android demo运行预测时崩溃 #10584

Open
nielev opened this issue Nov 2, 2024 · 1 comment

Comments

@nielev
Copy link

nielev commented Nov 2, 2024

为使您的问题得到快速解决,在建立 Issue 前,请您先通过如下方式搜索是否有相似问题:历史 issue, FAQ 文档, 官方文档

  • 标题:yolov11转出的模型,用2.14的opt转到nb模型,android demo运行预测时崩溃

  • 版本、预测库信息:
       1)Paddle Lite 版本:v2.14 commit:58e876d38d92b722f527946954c12231cd7ef7c6
       2)Host 环境:Mac OS 15.0.1
       3)运行设备环境:请描述运行设备信息,小米 12Pro
       4)预测后端信息: CPU

  • 预测信息
       1)预测 API:java
       2)预测选项信息:armv8、单线程
       3)预测库来源:官网下载inference_lite_lib.android.armv8.gcc.c++_static.with_extra

  • 复现信息:如为报错,请提供剥离业务环境的可复现预测 demo,用于问题复现

  • 用mac版本的2.14opt转换的nb模型
    v2.0_det_opt.nb.zip

  • 问题描述:请详细描述您的问题,同步贴出报错信息、日志/代码关键片段

  • 运行预测就crash

  • [F 11/ 2 10:34:50.665 ...Paddle-Lite/lite/operators/reshape_op.cc:326 ValidateShape] Check failed: (capacity == input_size): 102400!==230400 Invalid shape is given.
    2024-11-02 10:34:50.665 30706-30756 libc com.baidu.paddle.lite.demo.ocr A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 30756 (Predictor Worke), pid 30706 (e.lite.demo.ocr)
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A Build fingerprint: 'Xiaomi/zeus/zeus:14/UKQ1.230917.001/V816.0.4.0.ULBCNXM:user/release-keys'
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A Revision: '0'
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A ABI: 'arm64'
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A Timestamp: 2024-11-02 10:34:50.739745624+0800
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A Process uptime: 5s
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A Cmdline: com.baidu.paddle.lite.demo.ocr
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A pid: 30706, tid: 30756, name: Predictor Worke >>> com.baidu.paddle.lite.demo.ocr <<<
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A uid: 10748
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A Abort message: '[F 11/ 2 10:34:50.665 ...Paddle-Lite/lite/operators/reshape_op.cc:326 ValidateShape] Check failed: (capacity == input_size): 102400!==230400 Invalid shape is given.'
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x0 0000000000000000 x1 0000000000007824 x2 0000000000000006 x3 00000076424003d0
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x4 2c646b6363604f2d x5 2c646b6363604f2d x6 2c646b6363604f2d x7 7f7f7f7f7f7f7f7f
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x8 00000000000000f0 x9 00000076ea8a7ea8 x10 0000000000000001 x11 00000076ea924420
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x12 0000000000000167 x13 0000000000000000 x14 0000000000000001 x15 ffffffffffffffc4
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x16 00000076ea98fa18 x17 00000076ea967ea0 x18 0000000000000040 x19 00000000000077f2
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x20 0000000000007824 x21 00000000ffffffff x22 0000007642400530 x23 0000000000000190
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x24 00000075c5f3bf20 x25 0000007642401260 x26 00000076f5a60f80 x27 000000762f7bcc00
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A x28 0000007642401010 x29 0000007642400450
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A lr 00000076ea915164 sp 00000076424003b0 pc 00000076ea915190 pst 0000000000001000
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A 2 total frames
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A backtrace:
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A #00 pc 0000000000095190 /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) (BuildId: 1e3ca19bcae05c01b019c85f3f422e56)
    2024-11-02 10:34:50.885 30804-30804 DEBUG pid-30804 A Crash #1 pc 000000000012b24c /data/app/~~f1rNRELraykqlKQrrIR16w==/com.baidu.paddle.lite.demo.ocr-A7nwYpEo1wdOrLI3SP8NrA==/base.apk!libpaddle_light_api_shared.so (offset 0x2fca000)
    2024-11-02 10:34:50.915 30804-30804 MIUINDBG pid-30804 E miui_native_debug_process_O
    2024-11-02 10:34:50.915 30804-30804 MIUINDBG pid-30804 E unable to connect to mqsas native socket
    2024-11-02 10:34:50.916 1113-1113 tombstoned tombstoned E Tombstone written to: tombstone_25
    ---------------------------- PROCESS ENDED (30706) for package com.baidu.paddle.lite.demo.ocr ----------------------------

@cmcamdy
Copy link
Contributor

cmcamdy commented Nov 4, 2024

从报错看是执行reshape算子的时候输入输出shape的大小不一致,参考这里代码的326行:https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/lite/operators/reshape_op.cc

  • 里面的capacity实际上就是输出shape的乘积
  • 然后就是你给的.nb文件,里面图太大了,建议针对reshape算子用二分切一下图,定位shape不一致的区域,方便进一步分析~

切图工具/print算子

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants