Does a neuron have to receive all its inputs before it can calculate/fire?
Hi, I was just curious with neurons say in the middle layers or output layer, do they have to receive all their inputs before they can calculate and the output their answer or can they just receive say half of their inputs etc? thx
No, they don't. You can't be sure that every neuron will fire all the time, which means a neuron in the next layer won't have any input from this one.
Usually though, if a neuron doesn't get anything on all its inputs, it won't fire anyway, since the total input will be too low.
Usually though, if a neuron doesn't get anything on all its inputs, it won't fire anyway, since the total input will be too low.
ohh i see, that makes alot of sense to me.
Thanks guys.
[Edited by - johnnyBravo on February 20, 2005 10:30:24 PM]
Thanks guys.
[Edited by - johnnyBravo on February 20, 2005 10:30:24 PM]
actually one more quick question,
say you have two input neurons connected to an output neuron, and input neuron 'a' fires, then a second later 'b' fires, would the output neuron calculate the answer (when 'b' fired) as if both had fired or just 'b'?
So basically im asking when an input neuron fires, does its output value stay there to be calculated with the rest of the input neurons by the output neuron.
thanks
say you have two input neurons connected to an output neuron, and input neuron 'a' fires, then a second later 'b' fires, would the output neuron calculate the answer (when 'b' fired) as if both had fired or just 'b'?
So basically im asking when an input neuron fires, does its output value stay there to be calculated with the rest of the input neurons by the output neuron.
thanks
What you can do, is you can have a stack based arch (you use a pointer and an array to simulate this, so that it is really really fast).
You modify all of the input neurons inputs, then you push pointers to them (there struct) onto the stack.
In the struct, you add a bool to say what its state is (wether it has fired or not).
Now, you do a loop:
Loop until there is nothting left in the stack:
Pop off an item from the stack, and call it s.
you go and you update s's children. (from the new input it recieved from its parents)
For each child whose state has changed, you go and you update its inputs for each of that childs children. You then push each of that childs children into the stack.
Loop
This will do what you want quite a bit faster.
From,
Nice coder
You modify all of the input neurons inputs, then you push pointers to them (there struct) onto the stack.
In the struct, you add a bool to say what its state is (wether it has fired or not).
Now, you do a loop:
Loop until there is nothting left in the stack:
Pop off an item from the stack, and call it s.
you go and you update s's children. (from the new input it recieved from its parents)
For each child whose state has changed, you go and you update its inputs for each of that childs children. You then push each of that childs children into the stack.
Loop
This will do what you want quite a bit faster.
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Basically you have a stack. (which is just an array and a pointer. I can explain over PM if your interested in it).
And you use it as the basis of the algorithm. Instead of iteratively checking each neuron like you would normally, you are using a stack to decide which neurons to check.
From,
Nice coder
And you use it as the basis of the algorithm. Instead of iteratively checking each neuron like you would normally, you are using a stack to decide which neurons to check.
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Couldn't we just talk here? I'm sure it won't get too messy.
So basically do you mean you would make a list of which neurons to check depending on which neurons have input(s)?
So say in neuron A gets an input and its output gets stored in a todo list for the next loop? And then in the next loop neuron F has an input which came from the previous loop of neuron A's output.
Am I way off or what? :)
So basically do you mean you would make a list of which neurons to check depending on which neurons have input(s)?
So say in neuron A gets an input and its output gets stored in a todo list for the next loop? And then in the next loop neuron F has an input which came from the previous loop of neuron A's output.
Am I way off or what? :)
Perc. A, gets a new input.
Its state changes (it used to be non-firing, now it is firing), so it gets added onto the to-do list.
What you really should do, is you have one stack per layer in your ann (you can actually have just one stack, you just change which layer it is pointing to as you ned to).
You start off, with the first layer (input).
You go and you add the inputs to the neurons, and you push them all on stackA.
Now, For each of those which changed there state, you go and you push them onto stackB.
Afterwards, you go and you xorswap the pointers from StackA and stackB, and you repeat with the second layer, then the third, ect...
This should be optimal for the ann. (ie. you are processing the minimum number of nodes required to get the correct result).
When dealing with stacks, look at how the stack on the cpu works.
You have an array, and a stack pointer.
on init, you go and you new up your array, and you set your sp as the beginning of the array.
When pushing data into the stack, you go and increment the sp, then you set the current value of the sp to be the data that is coming in.
When popping data out of the stack, you return the data that the sp currently points to, before decrementing the sp.
This makes stacks really fast on any cpu made recently. (ie. Past 486's), because it usesthe cache wisly.
From,
Nice coder
Its state changes (it used to be non-firing, now it is firing), so it gets added onto the to-do list.
What you really should do, is you have one stack per layer in your ann (you can actually have just one stack, you just change which layer it is pointing to as you ned to).
You start off, with the first layer (input).
You go and you add the inputs to the neurons, and you push them all on stackA.
Now, For each of those which changed there state, you go and you push them onto stackB.
Afterwards, you go and you xorswap the pointers from StackA and stackB, and you repeat with the second layer, then the third, ect...
This should be optimal for the ann. (ie. you are processing the minimum number of nodes required to get the correct result).
When dealing with stacks, look at how the stack on the cpu works.
You have an array, and a stack pointer.
on init, you go and you new up your array, and you set your sp as the beginning of the array.
When pushing data into the stack, you go and increment the sp, then you set the current value of the sp to be the data that is coming in.
When popping data out of the stack, you return the data that the sp currently points to, before decrementing the sp.
This makes stacks really fast on any cpu made recently. (ie. Past 486's), because it usesthe cache wisly.
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Depends upon your neural model.
You could have a thread running through the neurons firing them like mad, and then another polling neurons waiting for the impulse to sum to be over the threshold, and then they fire.
As an example, you realize. ^_^
Classically, a network attempts to fire in layers, I believe.
You could have a thread running through the neurons firing them like mad, and then another polling neurons waiting for the impulse to sum to be over the threshold, and then they fire.
As an example, you realize. ^_^
Classically, a network attempts to fire in layers, I believe.
~V'lionBugle4d
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement