Kohonen (example from help does not work)

조회 수: 1 (최근 30일)
Alexander
Alexander 2011년 9월 7일
Hi all, please I need your help !
example (Kohonen) from help does not work
>> p = [.1 .8 .1 .9; .2 .9 .1 .8];
>> net = newc([0 1; 0 1],2);
>> wts = net.IW{1,1}
>> biases = net.b{1};
>> net.trainParam.epochs = 500;
>> net = train(net,p);
>> a = sim(net,p);
>> ac = vec2ind(a); >> ac
ac =
1 1 1 1
>> wts
wts =
0.5000 0.5000
0.5000 0.5000
My weight did not change. in example
wts =
0.1000 0.1467
0.8474 0.8525
Maybe I'm doing something wrong?

채택된 답변

Alexander
Alexander 2011년 9월 8일
7.10.0 (R.2010b)
  댓글 수: 1
Lucas García
Lucas García 2011년 9월 8일
So, download the fix in the previous link and give it a try. Then it will work fine.

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

추가 답변 (3개)

Walter Roberson
Walter Roberson 2011년 9월 7일
You did not assign a new value to wts, so it is going to continue to be the value that was retrieved before you did the training. You need to retrieve net.IW{1,1} after the training in order to see the effect of the training on the weights.
  댓글 수: 1
Alexander
Alexander 2011년 9월 8일
These are my values after training
net.IW{1,1}
ans =
0.5000 0.5000
0.5000 0.5000
After training, they have not changed.

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


Lucas García
Lucas García 2011년 9월 8일
Which release are you using? There is a known bug in R2010b and R2011a regarding newc and competlayer.
It has been fixed in R2011b.
  댓글 수: 1
Alexander
Alexander 2011년 9월 12일
Thanks Men. You saved my life !!! :)))

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


Alexander
Alexander 2011년 9월 8일
It is strange, but FIX_R2010b_COMPETLAYERAYER.zip is corrupted.
FIX_R2011a_COMPETLAYER.zip is normal.

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by