@rasbt has shared some examples of using hdf5 data in this post, which also seems to support shuffling, so you might want to take a look at it.