mnists/README.md

52 lines
1.1 KiB
Markdown
Raw Normal View History

2018-03-14 08:16:14 -07:00
# mnists
downloads and prepares various mnist-compatible datasets.
2018-03-14 08:53:25 -07:00
files are downloaded to `~/.mnist`
and checked for integrity by SHA-256 hashes.
2018-03-14 08:16:14 -07:00
2018-03-14 09:19:07 -07:00
**dependencies:** python 3.6 (or later), numpy.
2018-03-14 08:16:14 -07:00
2018-03-14 09:19:07 -07:00
**install:** `pip install --upgrade --upgrade-strategy only-if-needed 'https://github.com/notwa/mnists/tarball/master#egg=mnists'`
2018-03-14 08:16:14 -07:00
2018-03-14 08:53:25 -07:00
I've added `--upgrade-strategy` to the command-line
2018-03-14 08:16:14 -07:00
so you don't accidentally "upgrade" numpy to
a version not compiled specifically for your system.
## usage
```python
import mnists
dataset = "emnist_balanced"
train_images, train_labels, test_images, test_labels = mnists.prepare(dataset)
```
2018-03-14 08:53:25 -07:00
the default images shape is (n, 1, 28, 28).
2018-03-14 08:16:14 -07:00
pass `flatten=True` to `mnists.prepare` to get (n, 784).
## datasets
in alphabetical order:
### [emnist][emnist]
* `emnist_balanced`
* `emnist_byclass`
* `emnist_bymerge`
* `emnist_digits`
* `emnist_letters`
* `emnist_mnist`
### [fashion-mnist][fashion-mnist]
* `fashion_mnist`
### [mnist][mnist]
* `mnist`
[emnist]: //www.nist.gov/itl/iad/image-group/emnist-dataset
[fashion-mnist]: //github.com/zalandoresearch/fashion-mnist
[mnist]: http://yann.lecun.com/exdb/mnist/