From 984d2e73d8e5cbf3413ea14e2aa018cab8e4bcf2 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Wed, 14 Mar 2018 16:53:25 +0100 Subject: [PATCH] cleanup --- README.md | 9 +++++---- mnists/__init__.py | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e61cf65..8dabcde 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,14 @@ 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 -**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 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) ``` -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). ## datasets diff --git a/mnists/__init__.py b/mnists/__init__.py index 20fb634..f43bc3e 100644 --- a/mnists/__init__.py +++ b/mnists/__init__.py @@ -194,7 +194,6 @@ def prepare(dataset="mnist", return_floats=True, return_onehot=True, make_directories() existing = [os.path.isfile(construct_path(name)) for name in names] - npz_existing, gz_existing = existing[0], existing[1:] for name in images_and_labels: