ImageNet-to-TFrecord
ImageNet-to-TFrecord copied to clipboard
random.shuffle doesn't work to shuffled_index, which affect the training results
there are some problem if using the code follow,because the function random.shuffle does not work to shuffled_index
, which affect the training results.
shuffled_index = range(len(filenames))
random.seed(12345)
random.shuffle(list(range(len(shuffled_index))))
I modify the code follow, it does work:
shuffled_index = list(range(len(filenames)))
random.seed(12345)
random.shuffle(shuffled_index)
Quite an important fix, this! Training with samples entirely in order simply doesn't work.