问题
Assume I have a minibatch as a result of this code:
test_minibatch = reader_test.next_minibatch(10)
How can I get to the indexes of this minibatch as reference into the original data? Assume my test dataset was 100 rows. How can I know which 10 rows out of the 100 original rows are in the minibatch?
回答1:
Can you create a column with unique Id's (usually called a GUID / UUID) and read that in the reader. This is one way to map your sample to master set. It scales well with very large datasets spanning multiple disks and distributed computing frameworks.
来源:https://stackoverflow.com/questions/41513359/how-to-get-to-the-original-index-from-a-minibatch