Any way to check test accuracy with python code


  I have built a mode with train and valid data successfully and now applied it to test data(12500 images). 
 For its result, currently I have to print batches.filenames and preds to check them one by one if they're corresponding.  So here my question is any better way to check its accuracy for test data?


You can hand label a number of your test set so you know what the answer should be. That will allow you to get an actual percentage. That’s basically what the validation set is set aside for. Does this answer your question or are you looking for a faster way to iterate through test prediction and images?

thanks, Kevin.

yes, we may add labels for test data just like that for validation set and then can get the accuracy percentage easily.

but if test data is a little huge, this handy work would be very hard, right? so I just wonder any better way to do it, otherwise, how can we evaluate our model work well or not on test data efficiently? just check them one by one?

The only other way I have done it is by actually submitting my results in the competition. This will give you as good of benchmark as you can get, but it is usually limited to a few times per day. The whole point of this is to figure out what the answer is, so if you already had the test answers, then everyone would get 100% accuracy. Does that make sense?