Unrecognized function or variable 'trainedNetwork_3'

1 vue (au cours des 30 derniers jours)
Luc Xuan Bui
Luc Xuan Bui le 12 Août 2021
Commenté : Luc Xuan Bui le 15 Août 2021
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!!!

Réponses (1)

Walter Roberson
Walter Roberson le 12 Août 2021
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 commentaires
Walter Roberson
Walter Roberson le 12 Août 2021
kq_alexnet = (string(label) + ", " + num2str(100*max(probs),3) + "%");
Luc Xuan Bui
Luc Xuan Bui le 15 Août 2021
tks so much

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by