Importazione ed esportazione di Deep Learning
Importare reti e grafici di livello da TensorFlow™ 2, TensorFlow-Keras, PyTorch®, dal formato di modello ONNX™ (Open Neural Network Exchange) e da Caffe. È inoltre possibile esportare reti e grafici di livello Deep Learning Toolbox™ su TensorFlow 2 e nel formato di modello ONNX. Per ulteriori informazioni, vedere Reti neurali deep preaddestrate e Interoperability Between Deep Learning Toolbox, TensorFlow, PyTorch, and ONNX.
Per eseguire le funzioni di importazione ed esportazione in Deep Learning Toolbox è necessario disporre dei pacchetti di supporto. Se il pacchetto di supporto non è installato, ciascuna funzione fornisce un link per il download del pacchetto di supporto corrispondente nell'Add-On Explorer. Si consiglia di scaricare il pacchetto di supporto nella posizione predefinita per la versione MATLAB® in uso. È inoltre possibile scaricare direttamente i pacchetti di supporto dai seguenti link.
Le funzioni
importONNXNetwork
,importONNXLayers
,importONNXFunction
eexportONNXNetwork
richiedono il convertitore Deep Learning Toolbox per il formato di modello ONNX. Per scaricare il pacchetto di supporto, andare a https://www.mathworks.com/matlabcentral/fileexchange/67296-deep-learning-toolbox-converter-for-onnx-model-format.Le funzioni
importTensorFlowNetwork
,importTensorFlowLayers
,exportNetworkToTensorFlow
,importKerasNetwork
eimportKerasLayers
richiedono il convertitore Deep Learning Toolbox per i modelli TensorFlow. Per scaricare il pacchetto di supporto, andare a https://www.mathworks.com/matlabcentral/fileexchange/64649-deep-learning-toolbox-converter-for-tensorflow-models.La funzione
importNetworkFromPyTorch
richiede il convertitore Deep Learning Toolbox per i modelli PyTorch. Per scaricare il pacchetto di supporto, andare a https://www.mathworks.com/matlabcentral/fileexchange/111925.Le funzioni
importCaffeNetwork
eimportCaffeLayers
richiedono l’importatore Deep Learning Toolbox per i modelli Caffe. Per scaricare il pacchetto di supporto, andare a https://www.mathworks.com/matlabcentral/fileexchange/61735-deep-learning-toolbox-importer-for-caffe-models.
Funzioni
Argomenti
- Interoperability Between Deep Learning Toolbox, TensorFlow, PyTorch, and ONNX
Learn how to import networks from TensorFlow, PyTorch, and ONNX and use the imported networks for common Deep Learning Toolbox workflows. Learn how to export networks to TensorFlow and ONNX.
- Tips on Importing Models from TensorFlow, PyTorch, and ONNX
Tips on importing Deep Learning Toolbox networks or layer graphs from TensorFlow, PyTorch, and ONNX.
- Reti neurali deep preaddestrate
Apprendere come scaricare e utilizzare le reti neurali convoluzionali preaddestrate per la classificazione, il transfer learning e l’estrazione di feature.
- Inference Comparison Between TensorFlow and Imported Networks for Image Classification
Perform prediction in TensorFlow with a pretrained network, import the network into MATLAB using
importTensorFlowNetwork
, and then compare inference results between TensorFlow and MATLAB networks. - Inference Comparison Between ONNX and Imported Networks for Image Classification
Perform prediction in ONNX with a pretrained network, import the network into MATLAB using
importONNXNetwork
, and then compare inference results between ONNX and MATLAB networks. - Assemble Network from Pretrained Keras Layers
This example shows how to import the layers from a pretrained Keras network, replace the unsupported layers with custom layers, and assemble the layers into a network ready for prediction.
- Replace Unsupported Keras Layer with Function Layer
This example shows how to import the layers from a pretrained Keras network, replace the unsupported layers with function layers, and assemble the layers into a network ready for prediction.
- Classify Images in Simulink with Imported TensorFlow Network
Import a pretrained TensorFlow network using
importTensorFlowNetwork
, and then use the Predict block for image classification in Simulink®. - Deploy Imported TensorFlow Model with MATLAB Compiler
Import third-party pretrained networks and deploy the networks using MATLAB Compiler™.
- Select Function to Import ONNX Pretrained Network
Import an ONNX pretrained network using
importONNXNetwork
,importONNXLayers
, orimportONNXFunction
.
Informazioni complementari
- https://www.mathworks.com/matlabcentral/fileexchange/67296-deep-learning-toolbox-converter-for-onnx-model-format
- https://www.mathworks.com/matlabcentral/fileexchange/64649-deep-learning-toolbox-converter-for-tensorflow-models
- https://www.mathworks.com/matlabcentral/fileexchange/111925
- https://www.mathworks.com/matlabcentral/fileexchange/61735-deep-learning-toolbox-importer-for-caffe-models