Select Function to Import ONNX Pretrained Network
Deep Learning Toolbox™ Converter for ONNX™ Model Format provides three functions to import a pretrained ONNX (Open Neural Network Exchange) network:
This flow chart illustrates which import function best suits different scenarios.
importONNXLayers try to generate a custom layer when the
software cannot convert an ONNX operator into an equivalent built-in MATLAB® layer. For a list of operators for which the software supports
conversion, see ONNX Operators Supported for Conversion into Built-In MATLAB Layers.
save the generated custom layers in the package
+ in the current folder.
do not automatically generate a custom layer for each ONNX operator that is not supported for conversion into a built-in
This table describes each decision in the workflow for selecting an ONNX import function.
|Are all the ONNX operators supported for conversion into equivalent built-in MATLAB layers or can the software automatically generate custom layers?||
|Will you deploy the imported network?||If you use |
|Will you load the imported network with Deep Network Designer?||If you use |
|If you retrain the imported network, will you use a custom training loop?||
This table describes each action in the workflow for selecting an ONNX import function.
|Find and replace the placeholder layers||To find the names and indices of the placeholder layers in the
imported network, use the |