<br />

- **Description**:

The MNIST database of handwritten digits.

- **Additional Documentation** :
  [Explore on Papers With Code](https://paperswithcode.com/dataset/mnist)

- **Homepage** :
  <http://yann.lecun.com/exdb/mnist/>

- **Source code** :
  [`tfds.image_classification.MNIST`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/image_classification/mnist.py)

- **Versions**:

  - **`3.0.1`** (default): No release notes.
- **Download size** : `11.06 MiB`

- **Dataset size** : `21.00 MiB`

- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  Yes

- **Splits**:

| Split | Examples |
|---|---|
| `'test'` | 10,000 |
| `'train'` | 60,000 |

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(28, 28, 1), dtype=uint8),
        'label': ClassLabel(shape=(), dtype=int64, num_classes=10),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (28, 28, 1) | uint8 |   |
| label | ClassLabel |   | int64 |   |

- **Supervised keys** (See
  [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):
  `('image', 'label')`

- **Figure**
  ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):

![Visualization](https://storage.googleapis.com/tfds-data/visualization/fig/mnist-3.0.1.png)

- **Examples** ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):

<iframe src="https:///frame/datasets/catalog/mnist_541d4e5b2f827f199064bd7fb0ea05c36f6405a20b7a010f2d6cd40919957653.frame" class="framebox inherit-locale " allow="clipboard-write https://" allowfullscreen is-upgraded></iframe>

- **Citation**:

    @article{lecun2010mnist,
      title={MNIST handwritten digit database},
      author={LeCun, Yann and Cortes, Corinna and Burges, CJ},
      journal={ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist},
      volume={2},
      year={2010}
    }