Test a newly trained model, which weights/biases set does the mode use?

I have a silly question. For example, I trained my model with 100 epochs. At epoch 88, the accuracy rate has reached the highest (92%) level. The 100th epoch only produced an 89% accuracy rate.

Once the train is finished with the 100 epochs (train/validation at the same time), the next step is to test the model. I was wondering which epoch weights/biases do the model use? Is it the 88th (92%) model or the 100th (89%) model?

When I save the model to my local device, which weights/biases set does the model used to store the model file locally?

Assuming you are calculating the accuracy on the validation dataset, you could use early stopping and store the model giving the best validation accuracy.

Whatever the current state_dict returns, i.e. if you’ve continued training the model to 100 epochs and store the model.state_dict() afterwards, the current parameters trained for 100 epoch are stored.