Skip to main content

Low Dependency Fetching of MNIST dataset

Project description


PyPi Version Actions Status Code style: black

Download MNIST and Fashion MNIST datasets without needing to install tensorflow.


pip install get-mnist

CLI Download

mnist --dataset [mnist, fashion] --cache [CACHE]

Use the --dataset flag to decide if you want to download the original MNIST dataset or the Fashion MNIST dataset. Use the --cache flag to decide where to save the dataset. If omitted it defaults to $XDG_DATA_HOME/MNIST or $XDG_DATA_HOME/FASHION_MNIST.

Programatic Download

from mnist import get_mnist
x, y, x_test, y_test = mnist('MNIST')
x, y, x_test, y_test = fashion_mnist('FASHION_MNIST')

The function argument is the name of the directory to cache the dataset in. These functions can also take train_url, train_label_url, test_url, and test_label_url to download data from different sources.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

get-mnist-1.0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

get_mnist-1.0.1-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page