add qmnist dataset
This commit is contained in:
parent
988f481bc0
commit
2f0b985acf
4 changed files with 24 additions and 11 deletions
|
@ -66,7 +66,9 @@ in alphabetical order, using default `mnists.prepare` arguments:
|
|||
| [emnist][] | emnist\_mnist | (60000, 1, 28, 28) | (60000, 10) | (10000, 1, 28, 28) | (10000, 10) |
|
||||
| [fashion-mnist][] | fashion\_mnist | (60000, 1, 28, 28) | (60000, 10) | (10000, 1, 28, 28) | (10000, 10) |
|
||||
| [mnist][] | mnist | (60000, 1, 28, 28) | (60000, 10) | (10000, 1, 28, 28) | (10000, 10) |
|
||||
| [qmnist][] | qmnist | (60000, 1, 28, 28) | (60000, 10) | (60000, 1, 28, 28) | (60000, 10) |
|
||||
|
||||
[emnist]: //www.nist.gov/itl/iad/image-group/emnist-dataset
|
||||
[fashion-mnist]: //github.com/zalandoresearch/fashion-mnist
|
||||
[mnist]: http://yann.lecun.com/exdb/mnist/
|
||||
[qmnist]: //github.com/facebookresearch/qmnist
|
||||
|
|
|
@ -27,7 +27,7 @@ output_directory = os.path.join(home, ".mnist")
|
|||
webhost = "https://eaguru.guru/mnist/"
|
||||
|
||||
|
||||
def _make_meta(train_part="train", test_part="t10k", prefix=""):
|
||||
def _make_meta(prefix, train_part="train", test_part="t10k"):
|
||||
images_suffix = "-images-idx3-ubyte.gz"
|
||||
labels_suffix = "-labels-idx1-ubyte.gz"
|
||||
return (prefix,
|
||||
|
@ -37,19 +37,21 @@ def _make_meta(train_part="train", test_part="t10k", prefix=""):
|
|||
test_part + labels_suffix)
|
||||
|
||||
|
||||
def _emnist_meta(name):
|
||||
return _make_meta(name + "-train", name + "-test", prefix="emnist")
|
||||
def _make_meta2(name):
|
||||
prefix, _, _ = name.partition("-")
|
||||
return _make_meta(prefix, name + "-train", name + "-test")
|
||||
|
||||
|
||||
metadata = dict(
|
||||
emnist_balanced=_emnist_meta("emnist-balanced"),
|
||||
emnist_byclass=_emnist_meta("emnist-byclass"),
|
||||
emnist_bymerge=_emnist_meta("emnist-bymerge"),
|
||||
emnist_digits=_emnist_meta("emnist-digits"),
|
||||
emnist_letters=_emnist_meta("emnist-letters"),
|
||||
emnist_mnist=_emnist_meta("emnist-mnist"),
|
||||
fashion_mnist=_make_meta(prefix="fashion-mnist"),
|
||||
mnist=_make_meta(prefix="mnist"),
|
||||
emnist_balanced=_make_meta2("emnist-balanced"),
|
||||
emnist_byclass=_make_meta2("emnist-byclass"),
|
||||
emnist_bymerge=_make_meta2("emnist-bymerge"),
|
||||
emnist_digits=_make_meta2("emnist-digits"),
|
||||
emnist_letters=_make_meta2("emnist-letters"),
|
||||
emnist_mnist=_make_meta2("emnist-mnist"),
|
||||
fashion_mnist=_make_meta("fashion-mnist"),
|
||||
mnist=_make_meta("mnist"),
|
||||
qmnist=_make_meta2("qmnist"),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ urls = {
|
|||
"emnist": "//www.nist.gov/itl/iad/image-group/emnist-dataset",
|
||||
"fashion-mnist": "//github.com/zalandoresearch/fashion-mnist",
|
||||
"mnist": "http://yann.lecun.com/exdb/mnist/",
|
||||
"qmnist": "//github.com/facebookresearch/qmnist",
|
||||
}
|
||||
|
||||
print(row.format(*headers))
|
||||
|
|
|
@ -63,4 +63,12 @@ hashes = {
|
|||
'440fcabf73cc546fa21475e81ea370265605f56be210a4024d2ca8f203523609',
|
||||
'mnist/train-labels-idx1-ubyte.gz':
|
||||
'3552534a0a558bbed6aed32b30c495cca23d567ec52cac8be1a0730e8010255c',
|
||||
'qmnist/qmnist-test-images-idx3-ubyte.gz':
|
||||
'43fc22bf7498b8fc98de98369d72f752d0deabc280a43a7bcc364ab19e57b375',
|
||||
'qmnist/qmnist-test-labels-idx1-ubyte.gz':
|
||||
'3f384004f51536c2a29f2ce4d36388ee6cb8fff45bc3ad0cc588a86f2cc76375',
|
||||
'qmnist/qmnist-train-images-idx3-ubyte.gz':
|
||||
'9e26a7bf1683614e065d7b76460ccd52807165b3f22561fb782bd9f38c52b51d',
|
||||
'qmnist/qmnist-train-labels-idx1-ubyte.gz':
|
||||
'3552534a0a558bbed6aed32b30c495cca23d567ec52cac8be1a0730e8010255c',
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue