Share data loading with mnist.py example.