Hi, I'm reading a book about neural networks, and I've come across a small example on how to determine the weights for a neural network that has
2 input neurons connections to 1 output neuron.
heres the line I don't understand:
Quote:
If the output with input pattern (a, b) is greater than what it should be, then subtract 1 from w1 if the product aw1 is smaller than 1, and adjust w2 similarly.
Theres two outputs.
actualOutput = 0; //what the out neuron actually outputted
shouldBeOutput = 1; //what the out neuron should be outputting
And the input to input neuron1 is 'a';
From what I can tell it is,
if(actualOutput > shouldBeOutput) {
w1--; //subtract 1 from weight1
//I'm not sure if this is what the rule meant, which is underlined in the quote
if(a*w1 < 1) {
w2--; //subtract 1 from weight2
}
}
So is the code above right or wrong from what you can tell from the quote?
if you need anymore information, let me know.
Thanks