An example of tfs (https://github.com/geevi/tfs) usage on MNIST dataset. See mnist.py to see an example of doing data loading in a small dataset like mnist, where you take the full dataset to the RAM memory.
To try out do:
git clone --recursive https://github.com/geevi/tfs-mnist