Jump to content
  • Advertisement
Sign in to follow this  
Uthman

neural net code help

This topic is 4729 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 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 this post


Link to post
Share on other sites
Advertisement
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

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!