Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some codes follow PEP8 #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions benchmarks/kuzushiji_mnist_cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# input image dimensions
img_rows, img_cols = 28, 28


def load(f):
return np.load(f)['arr_0']

Expand Down
1 change: 1 addition & 0 deletions benchmarks/kuzushiji_mnist_knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from sklearn.neighbors import KNeighborsClassifier
import numpy as np


def load(f):
return np.load(f)['arr_0']

Expand Down
20 changes: 11 additions & 9 deletions download_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)':
Expand All @@ -39,6 +39,7 @@

}


# Download a list of files
def download_list(url_list):
for url in url_list:
Expand All @@ -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:')
Expand Down