I saw a lot of code were people use view() or reshape() “carelessly”. This is way that line jumped out to me immediately. I didn’t check the rest of your code much, but it looks alright. Then again, for small datasets, basic classifiers like Naive Bayes often show better results then Neural Networks.