Linux +Rt-smart 加载kmodel时报错

Viewed 51

问题描述


源码
AIBase::AIBase(const char *kmodel_file,const string model_name, const int debug_mode) : debug_mode_(debug_mode),model_name_(model_name)
{
if (debug_mode > 1)
cout << "kmodel_file:" << kmodel_file << endl;
std::ifstream ifs(kmodel_file, std::ios::binary);
kmodel_interp_.load_model(ifs).expect("Invalid kmodel");//加载模型文件
set_input_init();
set_output_init();
}

报错
image.png

1 Answers

这是内存申请错误,检查一下版本是不是2.9.0之前的版本,2.11.0在双系统上不支持,然后检查一下kmodel的拷贝是否正确,对比一下文件的md5。同时双系统已经不再维护,推荐使用C++开发RTOS,简单场景开发推荐使用MicroPython。