Made MNIST compatible with the pickle framework