PP-OCRv5_server_det训练自己的模型,转换为 .nb 部署,运行时报错,提示需要很大很大的内存,请问怎么处理 #16401
Unanswered
GaoMeng-2021
asked this question in
Q&A
Replies: 1 comment
-
你是通过什么转paddlelite的,用opt吗,paddleocr3.0后用json格式替代pdmodel格式后,是怎么正常使用opt转nb的呢 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
以 PP-OCRv5_server_det 为基础,添加了自己的标记,进行训练。在PC上,可以正常识别图像。
使用指令转换为 .nb 模型,指令为:
python tools/export_model.py -c "./configs/det/PP-OCRv5/PP-OCRv5_server_det_new01.yml" ^
-o Global.export_with_pir=False Global.pretrained_model="./output/ch_PP-OCRv5_REC_new01/best_model/model.pdparams" ^
Global.save_inference_dir="./inference_model/det_v5_server_new01/best_model/"
paddle_lite_opt_zyg --model_file=./inference.pdmodel
--param_file=./inference.pdiparams
--optimize_out=optimized_model_det
--optimize_out_type=naive_buffer
--valid_targets=arm
转换为 optimized_model_det.nb 文件,放入板子中,启动识别操作,提示:
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1275 Setup] ARM multiprocessors name: HARDWARE : ROCKCHIP RK3568 EVB1 DDR4 V10 BOARD
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1276 Setup] ARM multiprocessors number: 4
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1278 Setup] ARM multiprocessors ID: 0, max freq: 1992, min freq: 1992, cluster ID: 0, CPU ARCH: A55
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1278 Setup] ARM multiprocessors ID: 1, max freq: 1992, min freq: 1992, cluster ID: 0, CPU ARCH: A55
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1278 Setup] ARM multiprocessors ID: 2, max freq: 1992, min freq: 1992, cluster ID: 0, CPU ARCH: A55
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1278 Setup] ARM multiprocessors ID: 3, max freq: 1992, min freq: 1992, cluster ID: 0, CPU ARCH: A55
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1284 Setup] L1 DataCache size is:
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1286 Setup] 32 KB
[I 7/ 1 11:33: 2.886 ...addle-Lite-2.12/lite/core/device_info.cc:1286 Setup] 32 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1286 Setup] 32 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1286 Setup] 32 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1288 Setup] L2 Cache size is:
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1290 Setup] 512 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1290 Setup] 512 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1290 Setup] 512 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1290 Setup] 512 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1292 Setup] L3 Cache size is:
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1294 Setup] 0 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1294 Setup] 0 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1294 Setup] 0 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1294 Setup] 0 KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1296 Setup] Total memory: 1998392KB
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1297 Setup] SVE2 support: 0
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1298 Setup] SVE2 f32mm support: 0
[I 7/ 1 11:33: 2.887 ...addle-Lite-2.12/lite/core/device_info.cc:1299 Setup] SVE2 i8mm support: 0
[I 7/ 1 11:33: 3.325 ...e-Lite-2.12/lite/operators/squeeze_op.cc:124 AttachImpl] PaddleLiteV2.12 remove XShape OutputTensor for SqueezeOp.
[I 7/ 1 11:33: 3.534 ...e-Lite-2.12/lite/operators/squeeze_op.cc:124 AttachImpl] PaddleLiteV2.12 remove XShape OutputTensor for SqueezeOp.
[F 7/ 1 11:33:21.489 ....12/lite/backends/host/target_wrapper.cc:33 Malloc] Check failed: p: Error occurred in TargetWrapper::Malloc period: no enough for mallocing 18446744071803895808 bytes.
terminate called after throwing an instance of 'paddle::lite::PaddleLiteException'
what(): Paddle-Lite C++ Exception:
[F 7/ 1 11:33:21.489 ....12/lite/backends/host/target_wrapper.cc:33 Malloc] Check failed: p: Error occurred in TargetWrapper::Malloc period: no enough for mallocing 18446744071803895808 bytes.
按提示看,要求申请的内存为 18446744071803895808 bytes. 这个明显异常,请问要如何处理?
Beta Was this translation helpful? Give feedback.
All reactions