PRIS-CV / CAM-Guided-Attention

Code release for Grad-CAM Guided Attention Module for Fine-grained Visual Classification (MLSP 2022)
12 stars 1 forks source link

MODEL NOT CONVERGING #1

Closed fabihabushra closed 1 year ago

fabihabushra commented 1 year ago

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.

dongliangchang commented 1 year ago

The original question: 1678935471732

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.