Open jiafw opened 4 years ago
I was trying not to deviate as much as possible from the paper's model. I wanted to implement what they stated literally but found some questionable details, and the authors would not answer these questions I had about the model and their sample selection criteria, and would only tell me where their data came from.
For model.py: If you use the
nn.CrossEntropyLoss()
to compute the loss, you shouldn't usesoftmax
before computing loss. Becausenn.CrossEntropyLoss()
include the softmax step. It is clearly that it would be wrong to use the softmax steps twice.For dataset.py: I find that the number of test image and label is not equal. So I checked out the code and found the bug.