opt 转化成nb模型报错
Created by: zhangyaobo
代码test.py
# 引用Paddlelite预测库
from paddlelite.lite import *
# 1. 创建opt实例
opt=Opt()
# 2. 指定输入模型地址
opt.set_model_file("./ch_det_mv3_db/model")
opt.set_param_file("./ch_det_mv3_db/params")
# 3. 指定转化类型: arm、x86、opencl、xpu、npu
opt.set_valid_places("arm")
# 4. 指定模型转化类型: naive_buffer、protobuf
opt.set_model_type("naive_buffer")
# 4. 输出模型地址
opt.set_optimize_out("ch_det_mv3_db_opt")
# 5. 执行模型优化
opt.run()
~
python3 test.py result:
[I 8/13 17:50:29.314 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1065 Setup] ARM multiprocessors number: 4
[I 8/13 17:50:29.314 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1067 Setup] ARM multiprocessors ID: 0, max freq: 1428, min freq: 1428, cluster ID: 0, CPU ARCH: A57
[I 8/13 17:50:29.314 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1067 Setup] ARM multiprocessors ID: 1, max freq: 1428, min freq: 1428, cluster ID: 0, CPU ARCH: A57
[I 8/13 17:50:29.314 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1067 Setup] ARM multiprocessors ID: 2, max freq: 1428, min freq: 1428, cluster ID: 0, CPU ARCH: A57
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1067 Setup] ARM multiprocessors ID: 3, max freq: 1428, min freq: 1428, cluster ID: 0, CPU ARCH: A57
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1073 Setup] L1 DataCache size is:
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1075 Setup] 48 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1075 Setup] 48 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1075 Setup] 48 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1075 Setup] 48 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1077 Setup] L2 Cache size is:
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1079 Setup] 2048 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1079 Setup] 2048 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1079 Setup] 2048 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1079 Setup] 2048 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1081 Setup] L3 Cache size is:
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1083 Setup] 0 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1083 Setup] 0 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1083 Setup] 0 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1083 Setup] 0 KB
[I 8/13 17:50:29.315 ...ddle-Lite-2.6.1/lite/core/device_info.cc:1085 Setup] Total memory: 4051520KB
[I 8/13 17:50:29.359 ...tu/Paddle-Lite-2.6.1/lite/api/cxx_api.cc:251 Build] Load model from file.
[F 8/13 17:50:29.431 ...u/Paddle-Lite-2.6.1/lite/core/program.cc:192 Build] Check failed: op: no Op found for hard_swish