Hi Hongtao,
When shuffle is false, Caffe will load up hdf5 files in the order listed in the file. Within each file, it will pick samples in order in groups of 64. After all samples in the current hdf file are used, it will start on the next hdf5 file.
When shuffle is true, Caffe with shuffle the order of hdf5 files before going the list each time. That is, it will go through the whole list in one random order, then it will go through the whole list again in a different random order, etc. Within each file, it will pick samples in a random order. That is, it will use every sample exactly once, but the order will be random.
Because of this implementation, Caffe will use every sample once in one pass, and then use every sample in a second pass, and so on.
Eli