I have about 1.000.000 samples in total where 70% were for training and the 30% for test.

The training part was done in batches of 100 samples. To test the model, and calculate the accuracy, I can not load all test samples in memory.

Does make sense to use the same idea of training, batch-by-batch, to evaluate the model? If so, an overall accuracy would be the average of batch accuracy?


Sure, but this is dependent on the size of your batch dividing the number of testing examples evenly. A better approach would be to run the model on each testing batch, saving the predictions, and calculate the accuracy once all testing examples have been assigned a prediction.

Also, make sure that the model is not being updated in between testing batches.

  • $\begingroup$ Do you have any reference on this? Thank you. $\endgroup$
    – Helder
    Feb 26 '18 at 11:12
  • $\begingroup$ Nope, just work out the arithmetic. Which statement are you unsure about? $\endgroup$ Feb 26 '18 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.