Neural Network returning training data ratio instead of probability I am trying to create a neural network from scratch using numpy. 
I have created a network that can classify iris data base to a high degree of accuracy.

I am facing the problem that sometimes instead of predicting a class given input, the network just trains to return the probability distribution of the training sample irrespective of the input. 

So, after training the network on 150 samples (50 sample from each class), then on testing on a sample I would get (0.333 0.333 0.333) for each of the three classes, where the expected output was supposed to be, say, (1,0,0). 

I had solved that problem by tweaking the Hyperparameters, but I am facing a similar problem with wine data set, for which I cannot do the same. 

Has anybody faced this problem before? How did you solve it?
In case of any neural network if you are trying to solve the classification problem then it should generate probabilities.


If you are trying to solve 2 class classification problem then one can opt for sigmoid or softmax. In the case of sigmoid, your neural network only contains 1 output neuron which generates value probability and if probability greater than equal to 50 then belongs to one class and less than 50 then belongs to another class. e.g.(0.333 0.333 0.333) = (0.80) that means belongs class 1 and (0.666 0.333 0.999) = (0.40) that means belongs class 0
In the case of softmax, the neural network should have an equal number of output neurons to the number of categories. e.g.(0.333 0.333 0.333) = (0.80, 0.12, 0.08) that means belongs class 1 and e.g.(0.333 0.333 0.333) = (0.08, 0.20, 0.72) that means belongs class 3