Changed the helper.py a little. I imported another package random and used it to create a function distinctRand, which generates a sequence of DISTINCT random integers. This function is further applied to nextBatch and nextRandomBatch to pick random yet distinct examples for the batch. Note that in the original version, random index is chosen one at a time, and at different picks they can be the same, so we could end up having duplicates in our batch which I believe is not ideal. I accidentally made 2 commits but only the latest one is the right one and I don't know how to withdraw the first commit.
Changed the helper.py a little. I imported another package
random
and used it to create a functiondistinctRand
, which generates a sequence of DISTINCT random integers. This function is further applied tonextBatch
andnextRandomBatch
to pick random yet distinct examples for the batch. Note that in the original version, random index is chosen one at a time, and at different picks they can be the same, so we could end up having duplicates in our batch which I believe is not ideal. I accidentally made 2 commits but only the latest one is the right one and I don't know how to withdraw the first commit.