How to save property/variable to .mat file in app designer?

43 ビュー (過去 30 日間)
Thomas Groeneveld
Thomas Groeneveld 2020 年 2 月 24 日
コメント済み: Thomas Groeneveld 2020 年 2 月 25 日
I'm building a convolutional neural netwerk in app designer. So far it's been going great but I'm having trouble with the implementation of a save & load feature.
Basically I want to save and load my trained neural netwerk. I gave my netwerk the property 'Net', which in code looks like:
app.Net = resnet50();
Everything works but I can't seem to get this going. After I trained the network I tried saving the network using the following code:
app.Location = uigetdir;
save(fullfile(app.Location,'Saved network'), 'app.Net');
I get the error: 'app.Net' is not a valid variable name. I've used this code in MATLAB (without 'app.' extention of course) and everything worked.
Remove 'app.' is also without succes. Any help would be sweet!
Thanks in advance,
Thomas

採用された回答

Subhadeep Koley
Subhadeep Koley 2020 年 2 月 24 日
編集済み: Subhadeep Koley 2020 年 2 月 24 日
Hi Thomas, use this
app.Location = uigetdir;
temp = app.Net;
save(fullfile(app.Location, 'Saved network'), 'temp');
Hope this helps!

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGetting Started with Microsoft .NET についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by