---
title: "使用机器学习模型 - MetaEditor 帮助"
description: "MQL5语言支持 ONNX (开放式神经网络交换)模型的操作。ONNX是一种机器学习模型的开源格式。这种格式得到多个平台的支持，包括 Chainer , Caffee2 和 PyTorch... - 使用机器学习模型 - MetaEditor 帮助"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
---

[MetaEditor 帮助](https://www.metatrader5.com/zh/metaeditor/help) → 使用机器学习模型

# 使用机器学习模型

MQL5语言支持 [ONNX](https://ru.wikipedia.org/wiki/ONNX) (开放式神经网络交换)模型的操作。ONNX是一种机器学习模型的开源格式。这种格式得到多个平台的支持，包括 [Chainer](https://chainer.org/),[Caffee2](https://caffe2.ai/) 和 [PyTorch](https://pytorch.org/)。使用专门的工具创建ONNX模型，将其整合到您的MQL5应用程序，并使用它来做出交易决策。所有支持功能的描述都在 [MQL5文档](https://www.mql5.com/zh/docs/onnx)中提供。

## 在MetaEditor中查看模型 [#](#onnx)

你可以直接在编辑器中查看ONNX模型文件(*.onnx)的内容。例如，在 [Toolbox / Public Projects](https://www.metatrader5.com/zh/metaeditor/help/mql5storage/projects#public) 下找到项目ONNX.Price.Prediction并在快捷菜单中选择加入。该项目将下载到您的计算机并显示在导航器中。

![在MetaEditor中直接打开ONNX模型](https://www.metatrader5.com/i/help/metaeditor/en/onnx_view.png)

## Netron [#](#netron)

[Netron](https://github.com/lutzroeder/netron) 中的视图模型是ML模型的专用查看器，可以方便地查看其内容。该查看器支持多种流行模型，包括ONNX、TensorFlow Lite、Caffe、Keras和ncnn等。

要查看模型，请在导航器中选择其文件并单击“在Netron中打开”。如果未安装此实用程序，将打开其 [GitHub页面](https://github.com/lutzroeder/netron/releases) ，您可以根据您的操作系统从中下载相关安装程序。例如，使用适用于Windows的Netron-Setup-XXXexe。如果程序已安装，模型将立即打开，以便从导航器中查看。

![使用Netron可视化机器学习模型](https://www.metatrader5.com/i/help/metaeditor/en/onnx_netron.png)

支持的格式：

- armnn, caffemodel, circle, ckpt, cmf, dlc, dnn, h5, har, hd5, hdf5, hn, keras, kmodel,
- lite, mar, meta, mge, mlmodel, mlnet, mlpackage, mnn, model, nb, ngf, nn, nnp,
- om, onnx, ort, paddle, param, pb, pbtxt, pdiparams, pdmodel, pdopt, pdparams, prototxt, pt, pth, ptl,
- rknn, t7, tfl, tflite, tmfile, tm, tnnproto, torchscript, uff, xmodel

```json
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {"@type": "ListItem", "position": 1, "item": {"@id": "/zh/metaeditor/help", "name": "MetaEditor 帮助"}}, {"@type": "ListItem", "position": 2, "item": {"@id": "/zh/metaeditor/help/machine_learning", "name": "使用机器学习模型"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: 使用机器学习模型", "acceptedAnswer": { "@type": "Answer", "text": "MQL5语言支持 ONNX (开放式神经网络交换)模型的操作。ONNX是一种机器学习模型的开源格式。这种格式得到多个平台的支持，包括 Chainer , Caffee2 和 PyTorch 。使用专门的工具创建ONNX模型，将其整合到您的MQL5应用程序，并使用它来做出交易决策..." } }] }
```
