Skip to content

Commit 74ad9c3

Browse files
committed
Fix unavailable mnist dataset download link
1 parent 08855dc commit 74ad9c3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tensorlayerx/files/dataset_loaders/mnist_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ def load_mnist_dataset(shape=(-1, 784), path='data'):
3131
"""
3232
logging.info("If can't download this dataset automatically, "
3333
"please download it from the official website manually."
34-
"mnist Dataset <http://yann.lecun.com/exdb/mnist/>."
34+
"mnist Dataset <https://ossci-datasets.s3.amazonaws.com/mnist/>."
3535
"Please place dataset under 'data/mnist/' by default.")
36-
return _load_mnist_dataset(shape, path, name='mnist', url='http://yann.lecun.com/exdb/mnist/')
36+
return _load_mnist_dataset(shape, path, name='mnist', url='https://ossci-datasets.s3.amazonaws.com/mnist/')

tensorlayerx/files/dataset_loaders/mnist_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
__all__ = ["_load_mnist_dataset"]
1313

1414

15-
def _load_mnist_dataset(shape, path, name='mnist', url='http://yann.lecun.com/exdb/mnist/'):
15+
def _load_mnist_dataset(shape, path, name='mnist', url='https://ossci-datasets.s3.amazonaws.com/mnist/'):
1616
"""A generic function to load mnist-like dataset.
1717
1818
Parameters:
@@ -24,7 +24,7 @@ def _load_mnist_dataset(shape, path, name='mnist', url='http://yann.lecun.com/ex
2424
name : str
2525
The dataset name you want to use(the default is 'mnist').
2626
url : str
27-
The url of dataset(the default is 'http://yann.lecun.com/exdb/mnist/').
27+
The url of dataset(the default is 'https://ossci-datasets.s3.amazonaws.com/mnist/').
2828
"""
2929
path = os.path.join(path, name)
3030

tensorlayerx/files/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def load_mnist_dataset(shape=(-1, 784), path='data'):
280280
>>> X_train, y_train, X_val, y_val, X_test, y_test = tlx.files.load_mnist_dataset(shape=(-1,784), path='datasets')
281281
>>> X_train, y_train, X_val, y_val, X_test, y_test = tlx.files.load_mnist_dataset(shape=(-1, 28, 28, 1))
282282
"""
283-
return _load_mnist_dataset(shape, path, name='mnist', url='http://yann.lecun.com/exdb/mnist/')
283+
return _load_mnist_dataset(shape, path, name='mnist', url='https://ossci-datasets.s3.amazonaws.com/mnist/')
284284

285285

286286
def load_fashion_mnist_dataset(shape=(-1, 784), path='data'):
@@ -310,7 +310,7 @@ def load_fashion_mnist_dataset(shape=(-1, 784), path='data'):
310310
)
311311

312312

313-
def _load_mnist_dataset(shape, path, name='mnist', url='http://yann.lecun.com/exdb/mnist/'):
313+
def _load_mnist_dataset(shape, path, name='mnist', url='https://ossci-datasets.s3.amazonaws.com/mnist/'):
314314
"""A generic function to load mnist-like dataset.
315315
316316
Parameters:
@@ -322,7 +322,7 @@ def _load_mnist_dataset(shape, path, name='mnist', url='http://yann.lecun.com/ex
322322
name : str
323323
The dataset name you want to use(the default is 'mnist').
324324
url : str
325-
The url of dataset(the default is 'http://yann.lecun.com/exdb/mnist/').
325+
The url of dataset(the default is 'https://ossci-datasets.s3.amazonaws.com/mnist/').
326326
"""
327327
path = os.path.join(path, name)
328328

@@ -2375,7 +2375,7 @@ def maybe_download_and_extract(filename, working_directory, url_source, extract=
23752375
--------
23762376
>>> down_file = tlx.files.maybe_download_and_extract(filename='train-images-idx3-ubyte.gz',
23772377
... working_directory='data/',
2378-
... url_source='http://yann.lecun.com/exdb/mnist/')
2378+
... url_source='https://ossci-datasets.s3.amazonaws.com/mnist/')
23792379
>>> tlx.files.maybe_download_and_extract(filename='ADEChallengeData2016.zip',
23802380
... working_directory='data/',
23812381
... url_source='http://sceneparsing.csail.mit.edu/data/',

0 commit comments

Comments
 (0)