Home

Awesome

CNN-with-FashionMNIST

This is a repository for my first PyTorch Neural Network trained on FashionMNIST dataset.

The FashionMNIST dataset

This dataset can be found here. It consists 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. This dataset is harder than the MNIST dataset and hence accuracy on this dataset with same architecture will be less than that on the MNIST dataset.

The Dataset Class

PyTorch provides a way to create custom dataset classes and then load them during training as testing using data loader. The FashionMNIST dataset files are ubyte files which are in .gzip format. One can use either gzip python module or gzip manually and then use normal python file operations to open the files. The first 16 hexadecimal digits contain information like length,number of rows,number of columns,etc. The data after that contains the images. The training and test images sets are reshaped into tensors of shape (60000,28,28) and (10000,28,28) while the labels sets are converted to one-hot encoded tensors in the shape (60000,10) and (10000,28,28) respectively.

The Model

Some advantages and shortcomings of my model are discussed below -

Accuracy Details

Other Details

Running The Script