Unrecognized function or variable 'trainedNetwork_3'

What is the reason of that error and how can i fix it.
I loaded network (alexnet) , and i saved trainedNetwork_3 in CL_ban_ky.mat
When i run it, I had error.
But when I run load('CL_ban_ky.mat'); alone
After that I run train2.m, everything is well
I don't know what's happen!!!
Please help me! Thanks very much!!!

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 8 月 12 日

1 投票

When you assign the output of load() to a variable, it creates a struct with one field for each variable it loaded, and does not create a variable with that name in the workspace.
You should change to
[YPred, probs] = classify(net.trainedNetwork_3, I);

4 件のコメント

Luc Xuan Bui
Luc Xuan Bui 2021 年 8 月 12 日
Thank you very much!!!!
Luc Xuan Bui
Luc Xuan Bui 2021 年 8 月 12 日
編集済み: Walter Roberson 2021 年 8 月 12 日
Can you help me in this case? I don't know how to use anything instead 'String'
My code:
kq_alexnet = title(string(label) + ", " + num2str(100*max(probs),3) + "%");
set(handles.edit1,'string',kq_alexnet);
My error:
Error using matlab.ui.control.UIControl/set
Error setting property 'String' of class 'UIControl':
Value must be a character vector, categorical array, string array, numeric array, or cell array of character
vectors.
Walter Roberson
Walter Roberson 2021 年 8 月 12 日
kq_alexnet = (string(label) + ", " + num2str(100*max(probs),3) + "%");
Luc Xuan Bui
Luc Xuan Bui 2021 年 8 月 15 日
tks so much

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

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

製品

リリース

R2021a

タグ

質問済み:

2021 年 8 月 12 日

コメント済み:

2021 年 8 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by