1 系统环境
硬件环境(Ascend/GPU/CPU): Ascend/GPU/CPU
MindSpore版本: mindspore=2.2.10
执行模式(PyNative/ Graph):不限
Python版本: Python=3.8
操作系统平台: linux
2 报错信息
2.1 问题描述
使用机型:华为META60
场景:导出MacBert模型,用鸿蒙的MindSpore Lite 调用模型执行推理,代码如下:
2.2 脚本信息
2.3 日志信息
3 根因分析
******此处由用户填写******
4 解决方案
******此处由用户填写******
包含文字方案和最终脚本代码
请将正确的脚本打包并上传附件
1 系统环境
硬件环境(Ascend/GPU/CPU): Ascend/GPU/CPU
MindSpore版本: mindspore=2.2.10
执行模式(PyNative/ Graph):不限
Python版本: Python=3.8
操作系统平台: linux
2 报错信息
2.1 问题描述
使用机型:华为META60
场景:导出MacBert模型,用鸿蒙的MindSpore Lite 调用模型执行推理,代码如下:
2.2 脚本信息
auto inputs = OH_AI_ModelGetInputs(model); int n1 = 1; int n2 = 8; OH_AI_ShapeInfo *shape_infos = new OH_AI_ShapeInfo[3]; shape_infos[0].shape_num = 2; shape_infos[0].shape[0] = n1; shape_infos[0].shape[1] = n2; shape_infos[1].shape_num = 2; shape_infos[1].shape[0] = n1; shape_infos[1].shape[1] = n2; shape_infos[2].shape_num = 2; shape_infos[2].shape[0] = n1; shape_infos[2].shape[1] = n2; auto modelResizeInputs = OH_AI_ModelResize(model, inputs, shape_infos, 3); auto ret = FillInputTensor(inputs, input_data); auto predict_ret = OH_AI_ModelPredict(model, inputs, &outputs, nullptr, nullptr); if (predict_ret != OH_AI_STATUS_SUCCESS) { OH_AI_ModelDestroy(&model); LOGE("MS_LITE_ERR: MSLite Predict error.\n"); return OH_AI_STATUS_LITE_ERROR; }2.3 日志信息
3 根因分析
******此处由用户填写******
4 解决方案
******此处由用户填写******
包含文字方案和最终脚本代码
请将正确的脚本打包并上传附件