Pretrained Networks from External Platforms - MATLAB & Simulink (original) (raw)

Import pretrained networks from external deep learning platforms

Import neural networks from TensorFlow™ 2, TensorFlow-Keras, PyTorch®, the ONNX™ (Open Neural Network Exchange) model format, and Caffe. You can import networks interactively using the Deep Network Designer app or using command line functions. The app generates an import report which includes information about the import and if there are any required actions. For more information, see Pretrained Deep Neural Networks and Interoperability Between Deep Learning Toolbox, TensorFlow, PyTorch, and ONNX.

You must have support packages to run the import functions in Deep Learning Toolbox™. If the support package is not installed, each function provides a download link to the corresponding support package in the Add-On Explorer. A recommended practice is to download the support package to the default location for the version of MATLAB® you are running. You can also directly download the support packages from the following links.

Diagram showing the interoperability between Deep Learning Toolbox, TensorFlow, ONNX, and PyTorch.

Apps

Functions

expand all

TensorFlow Import

PyTorch Import

Caffe Import

ONNX Import

Parameters Imported by importONNXFunction

ONNXParameters Parameters of imported ONNX network for deep learning (Since R2020b)
freezeParameters Convert learnable network parameters in ONNXParameters to nonlearnable (Since R2020b)
unfreezeParameters Convert nonlearnable network parameters in ONNXParameters to learnable (Since R2020b)
addParameter Add parameter to ONNXParameters object (Since R2020b)
removeParameter Remove parameter from ONNXParameters object (Since R2020b)

Topics

Import

Python Coexecution