# neural net code help

This topic is 4818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So i read http://www.gamedev.net/reference/articles/article1988.asp and decided I wanted to implement an exact copy of this network. I set up my three-eight-eight-two feed forward network which is fine, but I am having difficulty understanding some of the fundamental concepts behind back propagation. I've read many sites on it and I've even implemented it on simple nets that have a single output. But my question is this: >> How do you properly calculate back propapagation when there are multiple outputs? Consider the following. I have two output neurons that are connected to 8 in my hidden layer. I store a delta for each of the two output neurons as:
deltaOutA = outputA*(1.0f-outputA)*(desiredOutA-outputA);
deltaOutB = outputB*(1.0f-outputB)*(desiredOutB-outputB);

Where outputA and B are the final outputs of the net and the desiredOutA and B are what im attempting to train the net to. Now, according to my undrstanding, each neuron in the net produces a single output; that output can be sent off to an arbitary amount of other neurons, but it is the same output that is sent off. That said, if i wish to consider any single neuron in the next hidden layer up, I should compute its delta by using the same process, more or less:
deltaHiddenA = hiddenOutA*(1.0f-hiddenOutA)*outputWA*deltaOutA;

wait a sec, deltaOutA? Why deltaOutA as opposed to deltaOutB? I am supposed to be propagating the error back up through the net but I don't know which deltaOut I should choose! Can I just average them or will that produce an unwanted result? Does there exist any specific method of doing back propagation when individual neurons send output to more than one other neuron and if so what is it? The text above is kind of whack so I think i'll make a quick drawing to go with it... ---- Edit how do i compute the deltas of the hidden layer? I don't know which output delta I should multiply by-- delta3 or delta4. [Edited by - Uthman on September 1, 2005 9:15:24 PM]

##### Share on other sites
hey man,

as far as the back propagation goes, have a look at this article, it helped me out a lot

http://www.generation5.org/content/2002/bp.asp

james

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633283
• Total Posts
3011208
• ### Who's Online (See full list)

There are no registered users currently online

×