Paddle-Lite icon indicating copy to clipboard operation
Paddle-Lite copied to clipboard

RepSVTR可以使用paddlelite工具进行端化吗

Open 1878708493 opened this issue 1 year ago • 5 comments

问题描述 / Problem Description

请问RepSVTR可以使用paddlelite工具转nb模型吗?我尝试做了一下,会报错: [F 7/18 18:53:41.205 ...e-Lite/lite/core/model/general/op_desc.h:118 GetAttr] Check failed: it != attrs().end(): No attributes called beta found for swish

运行环境 / Runtime Environment

  • OS: Ubuntu 20.04.4 LTS
  • Paddle: 2.6.1 gpu版本
  • PaddleOCR: 2.8.0
  • paddlelite: 2.13rc0

复现代码 / Reproduction Code

paddle_lite_opt --model_file=./openatom_rec_svtrv2_ch_train_eval/inference.pdmodel --param_file=./openatom_rec_svtrv2_ch_train_eval/inference.pdiparams --optimize_out=./openatom_rec_svtrv2_ch_train_eval_opt --valid_targets=arm --optimize_out_type=naive_buffer

完整报错 / Complete Error Message

[F 7/18 18:53:41.205 ...e-Lite/lite/core/model/general/op_desc.h:118 GetAttr] Check failed: it != attrs().end(): No attributes called beta found for swish

可能解决方案 / Possible solutions

附件 / Appendix

1878708493 avatar Jul 19 '24 02:07 1878708493

这个问题在develop分支上已经修复了。可以用develop分支重新编译下~

zhupengyang avatar Jul 24 '24 11:07 zhupengyang

python /Users/cc/Downloads/Paddle-Lite-2.14-rc/lite/api/python/bin/paddle_lite_opt --model_file=./openatom_rec_repsvtr_ch_infer/inference.pdmodel  --param_file=./openatom_rec_repsvtr_ch_infer/inference.pdiparams  --optimize_out=./openatom_rec_repsvtr_ch_infer_opt --valid_targets=arm  --optimize_out_type=naive_buffer
Loading topology data from ./openatom_rec_repsvtr_ch_infer/inference.pdmodel
Loading params data from ./openatom_rec_repsvtr_ch_infer/inference.pdiparams
1. Model is successfully loaded!
[F 12/17 11:58:34.909 ...e-Lite/lite/core/model/general/op_desc.h:118 GetAttr] Check failed: it != attrs().end(): No attributes called beta found for swish
[1]    21471 abort      python  --model_file=./openatom_rec_repsvtr_ch_infer/inference.pdmodel

用最新的还是遇到一样的问题,大佬帮看看~

@zhupengyang

burgessjp avatar Dec 17 '24 03:12 burgessjp

我也一样 用最新版本编译后该问题依然存在

Traceback (most recent call last): File "/workspace/project/test_old.py", line 17, in result = model.predict(im) File "/usr/local/lib/python3.10/dist-packages/fastdeploy/vision/detection/ppdet/init.py", line 126, in predict return self._model.predict(im) RuntimeError: Paddle-Lite C++ Exception: [F 12/31 19:22:32.760 ...e-Lite/lite/core/model/general/op_desc.h:118 GetAttr] Check failed: it != attrs().end(): No attributes called beta found for swish

xujiang1 avatar Dec 31 '24 11:12 xujiang1

我使用 develop 分支编译

xujiang1 avatar Dec 31 '24 11:12 xujiang1

可以使用 v2.14rc 解决,参考 https://github.com/PaddlePaddle/Paddle-Lite/issues/10531

MuShangCC avatar Jan 24 '25 05:01 MuShangCC

可以使用 v2.14rc 解决,参考 #10531

这个版本为什么没有py310的whl轮子

cbingdu avatar Jun 23 '25 02:06 cbingdu