The Fashion MNIST Dataset Class

Learn about the Fashion MNIST dataset.

We'll cover the following

The dataset

Fashion-MNIST is a dataset of Zalando’s article images—consisting of a training set of 60,000 examples and a test set of 10,000 examples.

Each example is a 28x28 grayscale image, associated with a label from 10 classes.

Each training and test example is assigned to one of the following labels:

  • 0 T-shirt/top
  • 1 Trouser
  • 2 Pullover
  • 3 Dress
  • 4 Coat
  • 5 Sandal
  • 6 Shirt
  • 7 Sneaker
  • 8 Bag
  • 9 Ankle boot

The dataset for this challenge is taken from kaggle, which contains the data in a CSV format.

Let’s go over the dataset class first.

The FMnistDataset class

The dataset has similar dimensions to the MNIST dataset. The FMNISTDataset class is the same as that of the MNIST class defined here.

Run the code below to have a look at the FMNIST images.

📝 For simplicity, we have taken a chunk of 140 images from the dataset.

Get hands-on with 1200+ tech skills courses.