Main Content

Pretrained Networks from External Platforms

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. For more information, see Reti neurali profonde preaddestrate 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.


espandi tutto

TensorFlow Import

importNetworkFromTensorFlowImport TensorFlow network as MATLAB network (Da R2023b)

PyTorch Import

importNetworkFromPyTorchImport PyTorch network as MATLAB network (Da R2022b)

Caffe Import

importCaffeNetworkImport pretrained convolutional neural network models from Caffe
importCaffeLayersImport convolutional neural network layers from Caffe

ONNX Import

importNetworkFromONNXImport ONNX network as MATLAB network (Da R2023b)

Parameters Imported by importONNXFunction

ONNXParametersParameters of imported ONNX network for deep learning (Da R2020b)
freezeParametersConvert learnable network parameters in ONNXParameters to nonlearnable (Da R2020b)
unfreezeParametersConvert nonlearnable network parameters in ONNXParameters to learnable (Da R2020b)
addParameterAdd parameter to ONNXParameters object (Da R2020b)
removeParameterRemove parameter from ONNXParameters object (Da R2020b)
dlnetworkDeep learning neural network (Da R2019b)
functionLayerFunction layer (Da R2021b)
replaceLayerReplace layer in neural network
addLayersAdd layers to neural network
removeLayersRemove layers from neural network



Custom Layers