Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neural network gives different output for same input

Tags:

What are the potential reasons for a NN to output different values for the same input? Especially when there isn't any random or stochastic processes?

like image 627
Ricky Han Avatar asked Jul 09 '17 08:07

Ricky Han


1 Answers

This is a very broad and general question, might be even too broad to even be on here, but there are several things you should know about neural networks:

  1. They are NOT methods for finding one prefect optimal solution. A neural network usually learn examples that it is given and "figures out" a way to predict results reasonably well. Reasonable is relative, and for some models may mean 50% success and for others anything short of 99.9% will be considered failure.

  2. They're outcome is very dependent on the data that was trained on. The order of data matters, and it's usually a good idea to shuffle data during training, but that can lead to wildly different results. Also, the quality of data matters - if the training data is very different in nature to the test data for example.

  3. The best analogy of neural networks in computing is of course - the brain. Even with the same information and same basic underlying biology, we could all evolve different opinions on matters based on endless other variables. Same thing with computer learning to some extent.

  4. Some types of neural networks use dropout layers, that are specifically designed to shut off random parts of the network during training. This should not affect the final prediction process, because for predictions that layer is usually set to allow all the parts of the network to operate, but if you are inputting data and telling the model it is "training" instead of asking it to predict, the results may vary significantly.

The sum of all this is just to say: The training of neural networks should be expected to yield different results from similar starting conditions, and so must be tested multiple times for every condition to determine what parts of it are inevitable and what parts are not.

like image 150
Ofer Sadan Avatar answered Oct 01 '22 01:10

Ofer Sadan