Tools for working with the MNIST data set