Kohonen (example from help does not work)
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (3)
Walter Roberson
am 7 Sep. 2011
0 Stimmen
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 Kommentar
Alexander
am 8 Sep. 2011
Lucas García
am 8 Sep. 2011
0 Stimmen
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 Kommentar
Alexander
am 12 Sep. 2011
Alexander
am 8 Sep. 2011
0 Stimmen
Kategorien
Mehr zu Function Approximation, Clustering, and Control finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!