cleanup
This commit is contained in:
parent
c65a3a64aa
commit
984d2e73d8
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
downloads and prepares various mnist-compatible datasets.
|
downloads and prepares various mnist-compatible datasets.
|
||||||
|
|
||||||
files are downloaded to `~/.mnist` and checked for integrity by sha256 hashes.
|
files are downloaded to `~/.mnist`
|
||||||
|
and checked for integrity by SHA-256 hashes.
|
||||||
|
|
||||||
**dependencies:** numpy
|
**dependencies:** numpy
|
||||||
|
|
||||||
**install:** `pip install --upgrade --upgrade-strategy only-if-needed mnists`
|
**install:** `pip install --upgrade --upgrade-strategy only-if-needed https://github.com/notwa/mnists/tarball/master#egg=mnists`
|
||||||
|
|
||||||
I've added --upgrade-strategy to the command-line
|
I've added `--upgrade-strategy` to the command-line
|
||||||
so you don't accidentally "upgrade" numpy to
|
so you don't accidentally "upgrade" numpy to
|
||||||
a version not compiled specifically for your system.
|
a version not compiled specifically for your system.
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ dataset = "emnist_balanced"
|
||||||
train_images, train_labels, test_images, test_labels = mnists.prepare(dataset)
|
train_images, train_labels, test_images, test_labels = mnists.prepare(dataset)
|
||||||
```
|
```
|
||||||
|
|
||||||
the default output shape is (n, 1, 28, 28).
|
the default images shape is (n, 1, 28, 28).
|
||||||
pass `flatten=True` to `mnists.prepare` to get (n, 784).
|
pass `flatten=True` to `mnists.prepare` to get (n, 784).
|
||||||
|
|
||||||
## datasets
|
## datasets
|
||||||
|
|
|
@ -194,7 +194,6 @@ def prepare(dataset="mnist", return_floats=True, return_onehot=True,
|
||||||
make_directories()
|
make_directories()
|
||||||
|
|
||||||
existing = [os.path.isfile(construct_path(name)) for name in names]
|
existing = [os.path.isfile(construct_path(name)) for name in names]
|
||||||
|
|
||||||
npz_existing, gz_existing = existing[0], existing[1:]
|
npz_existing, gz_existing = existing[0], existing[1:]
|
||||||
|
|
||||||
for name in images_and_labels:
|
for name in images_and_labels:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user