Open kaelchan opened 8 years ago
server.py
nn = OCRNeuralNetwork(HIDDEN_NODE_COUNT, data_matrix, data_labels, list(range(5000)));
the startup training using range(5000) for train_indices, this is not a good choice as the data is ordered (from 0 to 9). This would make the neural network output 9 for every input. Instead it should be like random.sample(range(5000), 5000)
or anything like this.
I have the following notes:
};
in ocr.jsI'd be happy to submit a PR @emtwo .
In
server.py
nn = OCRNeuralNetwork(HIDDEN_NODE_COUNT, data_matrix, data_labels, list(range(5000)));
the startup training using range(5000) for train_indices, this is not a good choice as the data is ordered (from 0 to 9). This would make the neural network output 9 for every input. Instead it should be likerandom.sample(range(5000), 5000)
or anything like this.
Moreover, there is only one epoch for the training process which is not enough
In
neural_network_design.py
The outer loop
for j in xrange(100):
is useless since the prediction of the neural network is definite. I think the author tried to combined the training process in the outer loop. Anyway, some correction should be made.