Saved DAGNetwork model is empty when accessed on a differnt machine
古いコメントを表示
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 件のコメント
Ben
2022 年 12 月 1 日
What version is the MATLAB on the other machine and does it have Deep Learning Toolbox installed? Does the .mat file load correctly on the machine it was saved on?
Typically I see this happen when I try to load a .mat file where the necessary classes/objects are not available on the other machine. Potentially the imported network required some custom layers that were generated when you imported the network on the original machine, and those layer definitions don't exist on the other machine. These custom layers should be defined in a +modelfile package/folder as described here:
So in that case you would need to copy those files to the new machine too, and make sure MATLAB can see them.
Matthias Kreuzer
2022 年 12 月 1 日
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 件)
カテゴリ
ヘルプ センター および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!