iOS使用paddle框架加载nb文件闪退 CreatePaddlePredictor(config);
收藏
使用PaddleDetection2.6版本源码训练目标识别模型,使用paddle_lite_opt \
--model_file=model \
--param_file=params \
--optimize_out_type=naive_buffer \
--optimize_out=./modelf \
--valid_targets=arm 命令导出为nb模型,然后原生代码中进行集成
NSString *path = [[NSBundle mainBundle] bundlePath];
std::string app_dir = std::string([path UTF8String]) + "/paddle";
MobileConfig config;
config.set_model_from_file(app_dir+"/model.nb");
predictor = CreatePaddlePredictor(config);
每次都在最后一句代码处闪退,请大佬指导一下,万分感谢
附:此代码加载mac上1.2.8PaddleX训练导出的nb没有问题,能识别物体
0
收藏
请登录后评论