I am working on a project on gesture recognition(in c# language). In some part I had to use neural networks using the sigmoid activation function. I am using the aforge.net(http://www.aforgenet.com/) library for the same. The system developed gets trained when I use a certain part of the training data. However when I use a different portion of the training set I give ans as NaN(not a number). Initially I thought it would be due to some variable overflow. However the system supports large number of inputs from one section of the training data and doesn't support as much as one inputs from the other section. Now this makes me reach a conclusion that something is wrong with that input. However I am not able to what may be probably wrong. I have tried fitting a logistic regression function which yielded similar results. Are there any constraints while modelling the input. Any help would be appreciated.


If you get NaNs there might be lots of reasons. But it is certainly part of the library, not of neural networks per se.

One tip is to make sure that your input data does not contain extreme values. Thus, make sure to scale them either to have mean 0 and unit variance, or scale them between 0 and 1.

If that does not solve your problem, contact the author of the library.

  • $\begingroup$ Though I have not mean normalized it, my values lie in between 0 and 1. That is not the problem. I will ask in the forum of the library too. $\endgroup$ – SonOfTheEARTh Mar 9 '12 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.