How do I export a neural network from MATLAB?

59 ビュー (過去 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.
  1 件のコメント
michael scheinfeild
michael scheinfeild 2018 年 8 月 8 日
should i compile to full caffe in c++ ?

サインインしてコメントする。

その他の回答 (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 Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by