Before you read this section, we recommend that you read Toolchain Operator Support Constraint List-ONNX Operator Support List section for an understanding of the operators and constraints supported by Horizon Robotics. Or, after you export your ONNX model, you can first refer to the Check the Model section to check that the model can be deployed with Horizon support for normal conversion.
A floating-point model trained on an open source DL framework is the input to the conversion tool, which currently supports the following DL frameworks:
| FRAMEWORK | HORIZON'S TOOLCHAIN |
|---|---|
| Caffe | Supported |
| PyTorch | Supported (convert into ONNX) |
| TensorFlow | Supported (convert into ONNX) |
| PaddlePaddle | Supported (convert into ONNX) |
| MXNet | Supported (convert into ONNX) |
| OTHERS | Contact Horizon |
As shown above, the caffemodel exported from Caffe framework can be supported directly, While the models trained from PyTorch, TensorFlow and MXNet must be first converted into ONNX before using the conversion tool. Presently Horizon supports ONNX opset10-19.
There are standard solutions to convert models of different frameworks into ONNX, refer to the following:
Pytorch2Onnx: PyTorch's official API can support exporting models into ONNX models,
click here to see more: https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html.
Tensorflow2Onnx: Conversion based on the onnx/tensorflow-onnx of the ONNX community,
click here to see more: https://github.com/onnx/tensorflow-onnx.
PaddlePaddle2Onnx: PaddlePaddle's official API can support exporting models into ONNX models,
click here to see more: https://www.paddlepaddle.org.cn/documentation/docs/en/api/paddle/onnx/export_en.html.
MXNet2Onnx: MXNet's official API can support exporting models into ONNX models,
click here to see more: https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Tests/OnnxConversionTest.cs.
More solutions to convert models of other frameworks into ONNX, please click here:
https://github.com/onnx/tutorials#converting-to-onnx-format.