π Fashion MNIST vs. Fast.ai
First of all, I really like working with this dataset, but it is not without its issues. For example, I, being a human of high intelligence and mental capacity, look at some of the shirts vs t-shirts vs pullovers vs coats vs dresses, and there are MANY of them that are incredibly difficult to differentiate, even with all the years of context and comprehension I bring to the table. So it is very understandable that the model would have a challenging time accomplishing the same objective.
At first I worked with PyTorch and used layered linear neural networks, you know, the old fashioned way...which is not that old, but Fast.ai makes it all seem old fashion at this point. Β Their innovation is just THAT good. With the normal PyTorch approach, my accuracy just would not exceed 88.73%, which saddened me greatly. So I turned to Fast.ai. Little did I know that it was gonna be a tricky situation at first.
As many times that I have worked with this set, I have never realized that when I import the data, they are not just simple images. I am still a bit new to the Fast.ai methods, and I needed image versions of the files to utilize their methods for now. Because after trying for hours to twist and turn tensors to make the models work with me, it was a no-go. But I did not want to give up!
So I spent about 3 hours fighting my Apple M1 processor, because it simply did not want to perform the operations necessary to convert the data to jpg files using TensorFlow operations. It was maddening to say the least. But I, AGAIN, was NOT going to give up!
So I went to the interwebs for help. I found this fantastic person's, Stas Bekman, GitHub project specifically for converting this dataset as well as the MNIST numbers. With a little code manipulation, I got the conversion going. The only other thing I had to do was combine all of the training and validation images into categorized folders, named with the article of clothing, since I wanted to use the Fast.ai method of splitting the sets myself.
My persistence really paid off! I was able to get those last 2% points. My goal was to get over 90% for this project. And when I use the Fast.ai function for plotting my highest losses, I can see why it is so tricky to get higher than that. It is the 5 articles of clothing I mentioned at the beginning: shirts, t-shirts, pullovers, coats, and dresses. They are extremely problematic, and they comprise half of the dataset. So all in all, I am happy with my current standing with this set using Fast.ai. I do intend to aim higher, but this is a good start!
The PDF of my entire project is here, or you can scroll through the Jupyter notebook below. For an interactive version of the notebook, click here.