4.1.1.3. Floating-point Model Preparation¶
Before you read this section, we recommend that you read our operator support list for an understanding of the operators and constraints supported by D-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 D-Robotics 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 D-Robotics |
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 D-Robotics supports ONNX opset10 and opset11.
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.
- 🔗 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.
Attention
Original model limitations: ir_version≤7, opset=10 or 11, for the correspondence between ir_version and onnx version, please refer to onnx official documentation .