334 Star 1.5K Fork 863

MindSpore / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
multi_platform_inference.md 2.06 KB
一键复制 编辑 原始数据 按行查看 历史
luojianing 提交于 2023-07-21 15:22 . replace target=blank

Multi-platform Inference

View Source On Gitee

Overview

Models based on MindSpore training can be used for inference on different hardware platforms. This document introduces the inference process on each platform.

  1. Inference on the Ascend 910 AI processor

    MindSpore provides the model.eval API for model validation. You only need to import the validation dataset. The processing method of the validation dataset is the same as that of the training dataset. For details about the complete code, see https://gitee.com/mindspore/mindspore/blob/r0.5/model_zoo/lenet/eval.py.

    res = model.eval(dataset)

    In addition, the model.predict interface can be used for inference. For detailed usage, please refer to API description.

  2. Inference on the Ascend 310 AI processor

    1. Export the ONNX or GEIR model by referring to the Export GEIR Model and ONNX Model.

    2. For performing inference in the cloud environment, see the Ascend 910 training and Ascend 310 inference samples. For details about the bare-metal environment (compared with the cloud environment where the Ascend 310 AI processor is deployed locally), see the description document of the Ascend 310 AI processor software package.

  3. Inference on a GPU

    1. Export the ONNX model by referring to the Export GEIR Model and ONNX Model.

    2. Perform inference on the NVIDIA GPU by referring to TensorRT backend for ONNX.

On-Device Inference

The On-Device Inference is based on the MindSpore Predict. Please refer to On-Device Inference Tutorial for details.

1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
r0.5

搜索帮助