I just checked the training records and found I didn’t evaluate the test set before saving and loading the model again. I will check it. But after the best model was loaded, the accuracy values of the training, validation and test sets were much low, just
0.3614, 0.3547, and 0.3547.
I didn’t use the model.eval(), but the model.train(False) before evaluation. I then set model.train(True) before the next training step.
After saving and then loading the best model (which had an accuracy of 1.0 for ADvsMCI), all the accuracy values cannot reach 1.0 again. They all are less than 0.4.
Something may be changed after I load the model, but I do not have any sense about the change. Besides, the training process is also wired. The accuracy values should not reach 1.0 at the first epoch. How do you think?
These are the training codes

training.png716×846 78.9 KB

The following is the evaluation codes

test.png734×773 70.2 KB

Thank you @ptrblck