title: Modifying last layer ResNet18 CNN Pytorch
body: <p>So I'm trying to build a logo-classifier with Pytorch by modifying the fc of a pretrained ResNet18 model by telling it to predict 47 classes (I want it to be able to distinguish 47 different logos) instead of 1000. It seems to go pretty well at first- achieves above .90 test accuracy in a couple of epochs, but when it comes to making predictions after training- it seems to output only one class. Moreover, the class that it outputs changes every time I run the notebook, so it's unreasonable to suspect that it predicts a majority-class. I've made sure that the model trains on a variety of classes, not just one or a couple of them. My best guess is that the parameters aren't updating right or something? I'm dropping a link below with the notebook for my code. If I can provide any more information that could be of any help, please tell me. Thank you.
  <a href="https://github.com/razvanfiser/Random-ML/blob/main/Logo%20Classification-Copy3.ipynb" rel="nofollow noreferrer">https://github.com/razvanfiser/Random-ML/blob/main/Logo%20Classification-Copy3.ipynb</a></p>