three neural net questions
i have coded a neural network (multi layered feed-forward with back-propagation).
1. how many layers with how many neurons should i generally create?
i thouhgt that the more information it needs to save i.e. the more patterns it has to recognize
the more layers and neurons do i need. is this correct?
how do you structure your nets?
2. i created a net with 4 inputs a few hidden layers and one output.
the four inputs are either 0 or 1 (bits) the output should be the decimal equivalent (divided by 16) formed by the four inputs.
(e.g. 1, 0, 1, 1 should result in 13/16)
i trained the net with all possible combinations but it always returns the last number trained.
*regardless* of the input!
i.e. it always returns 15/16 though the input is for instance -1,-2,-3,-4 !
why does the neural net do that?
3. one last question. when trying to recognize a particular mouse movement (e.g. did the player draw the letter ''R'' ?)
do i need a separate net for each letter/pattern ?
thanks in advance
1. how many layers with how many neurons should i generally create?
Start off with one layer and lots of neurons. (One hidden layer is enough to approximate any function) If that trains okay, reduce the number of hidden neurons. Keep reducing until the network has just enough neurons to give acceptable performance. When you have a lot more experience with neural nets, enquire into the benefits using more than one hidden layer will give you.
2. why does the neural net do that?
Sounds to me like you are not training it properly. When are you calculating the error and updating the weights?
3. one last question. when trying to recognize a particular mouse movement (e.g. did the player draw the letter ''R'' ?)
do i need a separate net for each letter/pattern ?
No.
ai-junkie.com
Start off with one layer and lots of neurons. (One hidden layer is enough to approximate any function) If that trains okay, reduce the number of hidden neurons. Keep reducing until the network has just enough neurons to give acceptable performance. When you have a lot more experience with neural nets, enquire into the benefits using more than one hidden layer will give you.
2. why does the neural net do that?
Sounds to me like you are not training it properly. When are you calculating the error and updating the weights?
3. one last question. when trying to recognize a particular mouse movement (e.g. did the player draw the letter ''R'' ?)
do i need a separate net for each letter/pattern ?
No.
ai-junkie.com
My Website: ai-junkie.com | My Books: 'Programming Game AI by Example' & 'AI Techniques for Game Programming'
thanks for the answer fup.
please give me one example where i''d benefit from more than one hidden layer.
my training function looks like this:
neuralnet::train (inputs[], desired[])
{
set-inputs();
simulate-net();
compute-errors(); // with backpropagation
adjust-weights-and-biases();
}
please give me one example where i''d benefit from more than one hidden layer.
my training function looks like this:
neuralnet::train (inputs[], desired[])
{
set-inputs();
simulate-net();
compute-errors(); // with backpropagation
adjust-weights-and-biases();
}
My Website: ai-junkie.com | My Books: 'Programming Game AI by Example' & 'AI Techniques for Game Programming'
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement