The ImageRecordIter is implemented in C++, you can find the source code here
I would suggest using the
Dataloader APIs as they are much more flexible. Instead of multi-threading it uses a multi-processing paradigm. Check this tutorial out to learn more, or the API docs
Overall I would suggest splitting your training and evaluation datasets by creating two
Dataloader, or in your case two
ImageRecordIter, one for training and one for evaluation. So that you can specify
shuffle=True on the training one, but not on the testing one. And you control what goes in the evaluation dataset in the first place.
Does that answer your question?