Thank you for your answer, but probably my question was not clear enough.
The problem is that after data layer (regardless of exact type) is first initialized, and Forward() is called, there is no way
to get any information about what test iteration it is and when next test phase starts.
I would like to reset data layer on every test phase start and feed exactly as many batches as there are in the test set.
Currently the only way I see how to do it is to set number of test iterations (multiplied by batch size) exactly equal
to test set size, keep iteration counter in (custom) data layer itself and reset it when all test set was consumed.
But this is completely idiotic, because I have to synchronize solver parameters with test set size every time I change
anything, and any mistake will lead to inconsistent testing.
Is there a normal way to do consistent testing?
Stepan.