Reputation: 1666
I want to use the neural network to classify handwritten digits of MNIST dataset
I have created 2 layer neural network with 100 hidden unit and trained it using 60,000 * 784 trainImages matrix and 60,000 * 1 trainLabels
net = newff(trainImages,trainLabels,100)
how to test and calculate the error rate of the trained network with 10,000 * 784 testImages
Upvotes: 1
Views: 2867
Reputation: 12709
Training:
[net,tr]=train(net,trainImages',trainLabels');
Testing:
PredictedLabels = sim(net,testImages');
error_rate = 1- mean(PredictedLabels == testLabels');
Upvotes: 2