Test the Network on a Subset
Explore how to test your trained neural network on a subset of the MNIST dataset. Understand how to query the network with unseen handwritten digit images, interpret output scores, and evaluate its classification accuracy, even when trained on limited data.
We'll cover the following...
Test the network
Now that we’ve trained the network, at least on a small subset of 100 records, we want to test how well that worked. We’ll do this against the second dataset, the training dataset.
First we need to get the test records, and the Python code we’ll use is very similar to what we used to get the training data:
We unpack this data the same way as before, because it has the same structure:
Before we create a loop to go through all the test records, let’s see what happens if we manually run one test. The following code shows the tenth record from the test dataset being used to query the now-trained neural network:
We can see that the label for the ...