Ascend
GPU
CPU
Inference Application
MindSpore can execute inference tasks on different hardware platforms based on trained models.
MindSpore can save two types of data: training parameters and network models that contain parameter information.
Basic concepts and application scenarios of these formats are as follows:
Inference can be classified into the following two modes based on the application environment:
Local inference
Load a checkpoint file generated during network training and call the model.predict
API for inference and validation. For details, see Online Inference with Checkpoint.
Cross-platform inference
Use a network definition and a checkpoint file, call the export
API to export a model file, and perform inference on different platforms. Currently, MindIR, ONNX, and AIR (on only Ascend AI Processors) models can be exported. For details, see Saving Models.
MindSpore defines logical network structures and operator attributes through a unified IR, and decouples model files in MindIR format from hardware platforms to implement one-time training and multiple-time deployment.
Overview
As a unified model file of MindSpore, MindIR stores network structures and weight parameter values. In addition, it can be deployed on the on-cloud Serving and the on-device Lite platforms to execute inference tasks.
A MindIR file supports the deployment of multiple hardware forms.
Application Scenarios
Use a network definition and a checkpoint file to export a MindIR model file, and then execute inference based on different requirements, for example, Inference Using the MindIR Model on Ascend 310 AI Processors, MindSpore Serving-based Inference Service Deployment, and Inference on Devices.
AdvancedEast | AlexNet | AutoDis | BERT | BGCF | CenterFace |
CNN | CNN&CTC | CRNN | CSPDarkNet53 | CTPN | DeepFM |
DeepLabV3 | DeepText | DenseNet121 | DPN | DS-CNN | FaceAttribute |
FaceDetection | FaceQualityAssessment | FaceRecognition | FaceRecognitionForTracking | Faster R-CNN | FasterRcnn-ResNet50 |
FasterRcnn-ResNet101 | FasterRcnn-ResNet152 | FCN | FCN-4 | GAT | GCN |
GoogLeNet | GRU | hardnet | InceptionV3 | InceptionV4 | LeNet |
LSTM-SegtimentNet | Mask R-CNN | MaskRCNN_MobileNetV1 | MASS | MobileNetV1 | MobileNetV2 |
NCF | PSENet | ResNet18 | ResNet50 | ResNet101 | ResNet152 |
ResNetV2-50 | ResNetV2-101 | ResNetV2-152 | SE-Net | SSD-MobileNetV2 | ResNext50 |
ResNext101 | RetinaNet | Seq2Seq(Attention) | SE-ResNet50 | ShuffleNetV1 | SimplePoseNet |
SqueezeNet | SSD | SSD-GhostNet | SSD-MobileNetV1-FPN | SSD-MobileNetV2-FPNlite | SSD-ResNet50 |
SSD-ResNet50-FPN | SSD-VGG16 | TextCNN | TextRCNN | TinyBert | TinyDarknet |
Transformer | UNet++ | UNet2D | VGG16 | WarpCTC | Wide&Deep |
WGAN | Xception | YOLOv3-DarkNet53 | YOLOv3-ResNet18 | YOLOv4 | YOLOv5 |
In addition to the network in the above table, if the operator used in the user-defined network can be exported to the MindIR model file, the MindIR model file can also be used to execute inference tasks.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。