observations.mnist

mnist(path)

Load the MNIST data set (LeCun, Bottou, Bengio, & Haffner, 1998).

Args:

  • path: str. Path to directory which either stores file or otherwise file will be downloaded and extracted there. Filenames are train-images-idx3-ubyte, train-labels-idx1-ubyte, t10k-images-idx3-ubyte, t10k-labels-idx1-ubyte.

Returns:

Tuple of np.ndarray's (x_train, y_train), (x_test, y_test).

LeCun, Y., Bottou, L., Bengio, Y., & Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11), 2278–2324.