Saved DAGNetwork model is empty when accessed on a differnt machine

조회 수: 6 (최근 30일)
Matthias Kreuzer
Matthias Kreuzer 2022년 11월 30일
댓글: Sivylla Paraskevopoulou 2022년 12월 2일
I have trained a CNN in pytorch and loaded it into Matlab via ONNX import and saved it is an DAGNetwork. The created DAGNetwork works fine on my computer but when I try to load the same .mat file on another machine, the DAGNetwork cannot be properly loaded. Connections, Layer fields, etc. cannot be accessed. Does anyone know why that is the case?
To my understanding everything that you need to use the model is stored in the DAGNetwork.
  댓글 수: 3
Matthias Kreuzer
Matthias Kreuzer 2022년 12월 1일
Yes, the issue was that matlab created a custom flatten layer. I replaced this layer with the Matlab FlattenLayer and then the net could be loaded on another machine.
Sivylla Paraskevopoulou
Sivylla Paraskevopoulou 2022년 12월 2일
In R2022b, MATLAB introduced the Deep Learning Toolbox Converter for PyTorch Models support package. This initial release supports importing image classification models directly from PyTorch. For more details, check out the blog post What’s New in Interoperability with TensorFlow and PyTorch and the importNetworkFromPyTorch documentation page.

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

답변 (0개)

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by