How do I export a neural network from MATLAB?

60 visualizzazioni (ultimi 30 giorni)
I have a neural network which I trained using MATLAB. I want to export the network so I can use it with other frameworks, for example PyTorch. How do I do that?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 18 Lug 2024
Modificato: MathWorks Support Team il 18 Lug 2024
You can export a Deep Learning Toolbox network or layer graph to TensorFlow and ONNX using the "exportNetworkToTensorFlow" and "exportONNXNetwork" functions, respectively.  For more information about exporting networks to external deep learning platforms, please see the following documentation page:
If you want to export you network to use in another framework, such as PyTorch, you should first export your network using the "exportONNXNetwork" function then, this ONNX model can then be imported into other deep learning frameworks that support ONNX model import.

Più risposte (2)

Maria Duarte Rosa
Maria Duarte Rosa il 25 Giu 2018
Modificato: Jon Cherrie il 21 Dic 2023
The exportONNXNetwork function in Deep Learning Toolbox Converter for ONNX Model Format allows one to export a trained deep learning network to the ONNX™ (Open Neural Network Exchange) model format. The ONNX model can then be imported into other deep learning frameworks that support ONNX model import.
To use the network with TensorFlow, use the exportNetworkToTensorFlow function that is part of the Deep Learning Toolbox Converter for TensorFlow Models.
  1 Commento
michael scheinfeild
michael scheinfeild il 6 Ago 2018
still i have no success to import it to c++ from onnx there are many issues of compilation

Accedi per commentare.


michael scheinfeild
michael scheinfeild il 14 Apr 2019
after testing onnx i found that the output of convolutions is not the same as in matlab .

Categorie

Scopri di più su Deep Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by