Advertisement Jump to content
Sign in to follow this  

neural net code help

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

So i read 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 this post

Link to post
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


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!