From 1e0b3b4d414ee9fa3b125f75c0a8f8766615a423 Mon Sep 17 00:00:00 2001 From: Daiki Katsuragawa <50144563+daikikatsuragawa@users.noreply.github.com> Date: Tue, 17 Mar 2020 01:45:25 +0900 Subject: [PATCH 1/3] Update kuzushiji_mnist_cnn.py --- benchmarks/kuzushiji_mnist_cnn.py | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/kuzushiji_mnist_cnn.py b/benchmarks/kuzushiji_mnist_cnn.py index 485d8bb..4c7553d 100644 --- a/benchmarks/kuzushiji_mnist_cnn.py +++ b/benchmarks/kuzushiji_mnist_cnn.py @@ -15,6 +15,7 @@ # input image dimensions img_rows, img_cols = 28, 28 + def load(f): return np.load(f)['arr_0'] From 77648cc9d60dcb17d5017ef597d70d1c41c5d6c6 Mon Sep 17 00:00:00 2001 From: Daiki Katsuragawa <50144563+daikikatsuragawa@users.noreply.github.com> Date: Tue, 17 Mar 2020 01:45:59 +0900 Subject: [PATCH 2/3] Update kuzushiji_mnist_knn.py --- benchmarks/kuzushiji_mnist_knn.py | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/kuzushiji_mnist_knn.py b/benchmarks/kuzushiji_mnist_knn.py index 2b04a58..327d662 100644 --- a/benchmarks/kuzushiji_mnist_knn.py +++ b/benchmarks/kuzushiji_mnist_knn.py @@ -4,6 +4,7 @@ from sklearn.neighbors import KNeighborsClassifier import numpy as np + def load(f): return np.load(f)['arr_0'] From b914293e8059eae7b754cb20765444a4caf04498 Mon Sep 17 00:00:00 2001 From: Daiki Katsuragawa <50144563+daikikatsuragawa@users.noreply.github.com> Date: Tue, 17 Mar 2020 01:49:01 +0900 Subject: [PATCH 3/3] Update download_data.py --- download_data.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/download_data.py b/download_data.py index 1b831de..6c84932 100644 --- a/download_data.py +++ b/download_data.py @@ -16,21 +16,21 @@ '1) Kuzushiji-MNIST (10 classes, 28x28, 70k examples)': { '1) MNIST data format (ubyte.gz)': ['http://codh.rois.ac.jp/kmnist/dataset/kmnist/train-images-idx3-ubyte.gz', - 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/train-labels-idx1-ubyte.gz', - 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/t10k-images-idx3-ubyte.gz', - 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/t10k-labels-idx1-ubyte.gz'], + 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/train-labels-idx1-ubyte.gz', + 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/t10k-images-idx3-ubyte.gz', + 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/t10k-labels-idx1-ubyte.gz'], '2) NumPy data format (.npz)': ['http://codh.rois.ac.jp/kmnist/dataset/kmnist/kmnist-train-imgs.npz', - 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/kmnist-train-labels.npz', - 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/kmnist-test-imgs.npz', - 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/kmnist-test-labels.npz'], + 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/kmnist-train-labels.npz', + 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/kmnist-test-imgs.npz', + 'http://codh.rois.ac.jp/kmnist/dataset/kmnist/kmnist-test-labels.npz'], }, '2) Kuzushiji-49 (49 classes, 28x28, 270k examples)': { '1) NumPy data format (.npz)': ['http://codh.rois.ac.jp/kmnist/dataset/k49/k49-train-imgs.npz', - 'http://codh.rois.ac.jp/kmnist/dataset/k49/k49-train-labels.npz', - 'http://codh.rois.ac.jp/kmnist/dataset/k49/k49-test-imgs.npz', - 'http://codh.rois.ac.jp/kmnist/dataset/k49/k49-test-labels.npz'], + 'http://codh.rois.ac.jp/kmnist/dataset/k49/k49-train-labels.npz', + 'http://codh.rois.ac.jp/kmnist/dataset/k49/k49-test-imgs.npz', + 'http://codh.rois.ac.jp/kmnist/dataset/k49/k49-test-labels.npz'], }, '3) Kuzushiji-Kanji (3832 classes, 64x64, 140k examples)': { '1) Folders of images (.tar)': @@ -39,6 +39,7 @@ } + # Download a list of files def download_list(url_list): for url in url_list: @@ -53,6 +54,7 @@ def download_list(url_list): f.write(chunk) print('All dataset files downloaded!') + # Ask the user about which path to take down the dict def traverse_dict(d): print('Please select a download option:')