MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / load_mnist

Function load_mnist

python/mlx/data/datasets/mnist.py:70–81  ·  view source on GitHub ↗

Load a buffer with the MNIST dataset. If the data doesn't exist download it and save it for the next time. Args: 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 t

(root=None, train=True)

Source from the content-addressed store, hash-verified

68
69
70def load_mnist(root=None, train=True):
71 """Load a buffer with the MNIST dataset.
72
73 If the data doesn't exist download it and save it for the next time.
74
75 Args:
76 root (Path or str, optional): The directory to load/save the data. If
77 none is given the ``~/.cache/mlx.data/mnist`` is used.
78 train (bool): Load the training or test set.
79 """
80
81 return _load_mnist_wrapper(root, train, "mnist")
82
83
84def load_fashion_mnist(root=None, train=True):

Callers

nothing calls this directly

Calls 1

_load_mnist_wrapperFunction · 0.85

Tested by

no test coverage detected