Effacer les filtres
Effacer les filtres

how to do comparison on neural network output

2 vues (au cours des 30 derniers jours)
Elysi Cochin
Elysi Cochin le 18 Mar 2013
i have saved 8 outputs of neural netowrk in one matfile "db_net"...
is it possible.... for me to execute one image and check whether its neural network output matches with anyone in the db_net matfile.....
i did like this...
count = 0;
load db_net
for i = 1:8
if db_net{i} == net;
count = i;
break;
end
end
but i'm getting error as....
??? Undefined function or method 'eq' for input arguments of type 'network'.
Error in ==> MainFile at 140
if db_net{i} == net;
i think its because of equal to operator.... please can someone show me how to do comparison on neural network output.... please do reply.....
  2 commentaires
Elysi Cochin
Elysi Cochin le 18 Mar 2013
i observed that the neural network output changes each time it is executed.... is there any output of "net" that remains same every time..... so that i can use that value for comparison...
Greg Heath
Greg Heath le 18 Mar 2013
Upon rereading your post I realized that I may not fully understand what you mean.
I thought you were saving trained nets obtained via training followed by the save command
db_net{ kk } = net ;
save db_net;
If so, the nets would be equal if and only if all properties have exactly the same values. Therefore, if the difference of just one component of one weight is not EXACTLY zero, the nets are different.
Is that really what you want?
Or are you saving net outputs y = net(x)? If so, the same comments apply.
Please clarify
Greg

Connectez-vous pour commenter.

Réponse acceptée

Greg Heath
Greg Heath le 18 Mar 2013
>> net1 = fitnet;net2=fitnet;isequal(net1,net2)
ans =
1
Hope this helps.
Thank you for formally accepting my answer
Greg

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by