필터 지우기
필터 지우기

how to do comparison on neural network output

조회 수: 2 (최근 30일)
Elysi Cochin
Elysi Cochin 2013년 3월 18일
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
Elysi Cochin
Elysi Cochin 2013년 3월 18일
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 2013년 3월 18일
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

댓글을 달려면 로그인하십시오.

채택된 답변

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by