How do I export a neural network from MATLAB?

조회 수: 71 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2017년 2월 15일
편집: MathWorks Support Team 2024년 7월 18일
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?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2024년 7월 18일
편집: MathWorks Support Team 2024년 7월 18일
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.

추가 답변 (2개)

Maria Duarte Rosa
Maria Duarte Rosa 2018년 6월 25일
편집: Jon Cherrie 2023년 12월 21일
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
michael scheinfeild
michael scheinfeild 2018년 8월 6일
still i have no success to import it to c++ from onnx there are many issues of compilation

댓글을 달려면 로그인하십시오.


michael scheinfeild
michael scheinfeild 2019년 4월 14일
after testing onnx i found that the output of convolutions is not the same as in matlab .

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by