0
$\begingroup$

To be clear, I shuffled my data when I trained it. It is only the testing data that I modified to be unshuffled, and found that accuracy tanks. (i also used the same data for training and for testing)

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

oh i found the issue. i forgot to write

rikaclassifier.eval()

i think the issue was that my model used batchnorm, and in the unshuffled data batchnorm encountered a lot of images that are pretty much the same except for some small differences, and this made it compute different means and standard deviations than it was used to in the unshuffled data. In particular, i found that my model always predicted a number closer to 1 than 0, which im guessing is because copies of the same image have 0 standard deviation, and so dividing by standard deviation will result in a huge blow up. Setting my model to eval mode made it use precomputed mean and standard deviation across the entire dataset from the training phase

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.