The Fashion MNIST Classifier Performance
Let's see how the network performs with the given configuration.
Training the classifier
Training a classifier neural network is now really simple. That’s because we’ve done all the hard work setting up the dataset class and the neural network class.
Press + to interact
%%time# create neural networkC = Classifier()# train network on MNIST data setepochs = 3for i in range(epochs):print('training epoch', i+1, "of", epochs)for label, image_data_tensor, target_tensor in fmnist_dataset:C.train(image_data_tensor, target_tensor)passpass
Train the network again for 6 min 44 sec with 3 epochs.
Testing the classifier
Now that we have a fairly well-trained network, let’s ask it to classify images. We’ll switch to the FMNIST test dataset of 10,000 images. These are images our neural network has not yet seen.
Loading the test data
Let’s load the dataset with a new Dataset object.
Press + to interact
# load MNIST test datafmnist_test_dataset = FMnistDataset('fashion_mnist/fashion-mnist_test.csv')
Classifying the test sample
We can pick a record from the test dataset and see what the image ...