Advertisement

three neural net questions

Started by May 09, 2003 12:18 PM
2 comments, last by diego_rodriguez 21 years, 4 months ago
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
Advertisement
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();
}
ftp://ftp.sas.com/pub/neural/FAQ3.html#A_hl



ai-junkie.com

This topic is closed to new replies.

Advertisement