Closed fabihabushra closed 1 year ago
The original question:
I cannot believe that you added nn.Softmax(dim=1) after the classifier while using nn.CrossEntropyLoss() as the loss function. You should not do this, and for the rationale, please refer to this issue: #https://github.com/PRIS-CV/Fine-Grained-or-Not/issues/7#issuecomment-1239459384. Moreover, I strongly urge you to meticulously read the PyTorch documentation and tutorials: https://pytorch.org/tutorials/. Thank you.
For any further inquiries, kindly send an email to our team.
The training and testing losses are not changing with the epochs passing.
There are other issues with this pipeline too. There was no activation inside the classifier of the class model_bn(). I added nn.Softmax(dim=1) for it to work.