- Description:
The MNIST database of handwritten digits.
Additional Documentation: Explore on Papers With Code
Homepage: http://yann.lecun.com/exdb/mnist/
Source code:
tfds.image_classification.MNISTVersions:
3.0.1(default): No release notes.
Download size:
11.06 MiBDataset size:
21.00 MiBAuto-cached (documentation): 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_superviseddoc):('image', 'label')Figure (tfds.show_examples):

- Examples (tfds.as_dataframe):
- 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}
}