How to get to the original index from a minibatch?

时光毁灭记忆、已成空白 提交于 2020-01-05 03:41:07

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!