mlx.data.datasets.load_mnist

mlx.data.datasets.load_mnist#

mlx.data.datasets.load_mnist(root=None, train=True)#

Load a buffer with the MNIST dataset.

If the data doesn’t exist download it and save it for the next time.

Parameters:
  • root (Path or str, optional) – The directory to load/save the data. If none is given the ~/.cache/mlx.data/mnist is used.

  • train (bool) – Load the training or test set.