You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
paddle_lite_opt --model_file=./ch_ppocr_mobile_v2_0_rec_v2_0/model.pdmodel --param_file=./ch_ppocr_mobile_v2_0_rec_v2_0/model.pdiparams --optimize_out=./ch_ppocr_mobile_v2_0_rec_v2_0_opt --valid_targets=huawei_kirin_npu,arm --optimize_out_type=naive_buffer
3. 修改了 https://github.com/PaddlePaddle/Paddle-Lite-Demo/tree/develop/ocr/android/shell/ppocr_demo/src 中的代码,添加了如下图片注释中的代码
4. 执行 https://github.com/PaddlePaddle/Paddle-Lite-Demo/tree/develop/ocr/android/shell/ppocr_demo 中的build.sh。报错如下(图片中的打印输出数字是定位在哪报错的,麻烦忽略)。定位在det模型的predictor_->Run();中报错。
3)问题
1. 我按以上同样的步骤,在转模型时只声明--valid_targets=arm,然后把在cpp中添加的代码注释(就是config配置set那部分代码)掉,执行,是可以正常输出的,如下。所以请问对于NPU的推理执行,我是不是中间漏掉了什么步骤,导致错误?
2. 在截图上的warning,我在docker中pip下载的paddlelite是2.14rc0的,在mac上用的也是v2.14-rc的opt_macos_aarch64来转为.nb,但很奇怪报了说我用的v2.10-rc的opt的警告,请问这个影响嘛?我有尝试将Paddle-Lite版本降为v2.10-rc,警告消除但是仍然报错Segmentation fault warning: the version of opt that transformed this model is not consistent with current Paddle-Lite version. version of opt:v2.10-rc version of current Paddle-Lite:v2.14-rc
The text was updated successfully, but these errors were encountered:
1)Paddle Lite 版本:v2.14-rc
2)Host 环境:Mac OS 13.0 M1Pro、docker:paddle-lite:2.0.0_beta
1)模型 ch_ppocr_mobile_v2.0_det、ch_ppocr_mobile_v2.0_rec
1)意图:想要在Kirin 810上的NPU推理ppocr
2)我的执行步骤:
1. 更新支持Kirin NPU的paddle lite(只运行了tiny_publish相关脚本)
更换后lib和include为
2. 将下载的tgz模型通过opt转换为.nb(在docker中用的paddle_lite_opt,在mac上用的v2.14-rc的opt_macos_aarch64)
paddle_lite_opt --model_file=./ch_ppocr_mobile_v2_0_det_v2_0/model.pdmodel --param_file=./ch_ppocr_mobile_v2_0_det_v2_0/model.pdiparams --optimize_out=./ch_ppocr_mobile_v2_0_det_v2_0_opt --valid_targets=huawei_kirin_npu,arm --optimize_out_type=naive_buffer
paddle_lite_opt --model_file=./ch_ppocr_mobile_v2_0_rec_v2_0/model.pdmodel --param_file=./ch_ppocr_mobile_v2_0_rec_v2_0/model.pdiparams --optimize_out=./ch_ppocr_mobile_v2_0_rec_v2_0_opt --valid_targets=huawei_kirin_npu,arm --optimize_out_type=naive_buffer
3. 修改了 https://github.com/PaddlePaddle/Paddle-Lite-Demo/tree/develop/ocr/android/shell/ppocr_demo/src 中的代码,添加了如下图片注释中的代码
4. 执行 https://github.com/PaddlePaddle/Paddle-Lite-Demo/tree/develop/ocr/android/shell/ppocr_demo 中的build.sh。报错如下(图片中的打印输出数字是定位在哪报错的,麻烦忽略)。定位在det模型的predictor_->Run();中报错。
3)问题
1. 我按以上同样的步骤,在转模型时只声明--valid_targets=arm,然后把在cpp中添加的代码注释(就是config配置set那部分代码)掉,执行,是可以正常输出的,如下。所以请问对于NPU的推理执行,我是不是中间漏掉了什么步骤,导致错误?
2. 在截图上的warning,我在docker中pip下载的paddlelite是2.14rc0的,在mac上用的也是v2.14-rc的opt_macos_aarch64来转为.nb,但很奇怪报了说我用的v2.10-rc的opt的警告,请问这个影响嘛?我有尝试将Paddle-Lite版本降为v2.10-rc,警告消除但是仍然报错Segmentation fault
warning: the version of opt that transformed this model is not consistent with current Paddle-Lite version. version of opt:v2.10-rc version of current Paddle-Lite:v2.14-rc
The text was updated successfully, but these errors were encountered: