From ee04eb7d193ee8d41026d53141fdf8f678c1a02a Mon Sep 17 00:00:00 2001 From: Ting Wang Date: Fri, 10 Apr 2020 16:15:03 +0800 Subject: [PATCH] update on device inference Signed-off-by: Ting Wang --- tutorials/source_en/advanced_use/on_device_inference.md | 2 +- tutorials/source_zh_cn/advanced_use/on_device_inference.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/source_en/advanced_use/on_device_inference.md b/tutorials/source_en/advanced_use/on_device_inference.md index 22a15885..7a93e30d 100644 --- a/tutorials/source_en/advanced_use/on_device_inference.md +++ b/tutorials/source_en/advanced_use/on_device_inference.md @@ -158,7 +158,7 @@ Use the .ms model file and image data as input to create a session and implement ![](./images/side_infer_process.png) Figure 1 On-device inference sequence diagram -1. Load the .ms model file to the memory buffer. The ReadFile function needs to be implemented by users. +1. Load the .ms model file to the memory buffer. The ReadFile function needs to be implemented by users, according to the [C++ tutorial](http://www.cplusplus.com/doc/tutorial/files/). ```cpp // read model file std::string modelPath = "./models/lenet/lenet.ms"; diff --git a/tutorials/source_zh_cn/advanced_use/on_device_inference.md b/tutorials/source_zh_cn/advanced_use/on_device_inference.md index be3461e5..5830298f 100644 --- a/tutorials/source_zh_cn/advanced_use/on_device_inference.md +++ b/tutorials/source_zh_cn/advanced_use/on_device_inference.md @@ -75,7 +75,7 @@ MindSpore Predict是一个轻量级的深度神经网络推理引擎,提供了 ## 端侧推理使用 -在APP的APK工程中使用MindSpore对进行模型推理时,模型推理前需要对输入进行必要的前处理,比如将图片转换成MindSpore推理要求的tensor格式、对图片进行resize等处理。在MindSpore完成模型推理后,对模型推理的结果进行后处理,并将处理的输出发送给APP应用。 +在APP的APK工程中使用MindSpore进行模型推理前,需要对输入进行必要的前处理,比如将图片转换成MindSpore推理要求的tensor格式、对图片进行resize等处理。在MindSpore完成模型推理后,对模型推理的结果进行后处理,并将处理的输出发送给APP应用。 本章主要描述用户如何使用MindSpore进行模型推理,APK工程的搭建和模型推理的前后处理,不在此列举。 @@ -157,7 +157,7 @@ if __name__ == '__main__': ![](./images/side_infer_process.png) 图1:端侧推理时序图 -1. 加载.ms模型文件到内存缓冲区,ReadFile函数功能需要用户自行实现。 +1. 加载.ms模型文件到内存缓冲区,ReadFile函数功能需要用户参考[C++教程](http://www.cplusplus.com/doc/tutorial/files/)自行实现。 ```cpp // read model file std::string modelPath = "./models/lenet/lenet.ms"; -- GitLab