Skip to content

Commit

Permalink
Merge pull request #1201 from tejuafonja/switch_mnist_mirror
Browse files Browse the repository at this point in the history
Switch mnist dataset mirror to a more reliable one
  • Loading branch information
tejuafonja authored Mar 17, 2021
2 parents a4f493c + 2f0ad4a commit 42fc431
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cleverhans_v3.1.0/cleverhans/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def maybe_download_file(url, datadir=None, force=False):


def download_and_parse_mnist_file(file_name, datadir=None, force=False):
url = os.path.join("http://yann.lecun.com/exdb/mnist/", file_name)
url = os.path.join('https://storage.googleapis.com/cvdf-datasets/mnist/', file_name)
file_name = maybe_download_file(url, datadir=datadir, force=force)

# Open the file and unzip it if necessary
Expand Down Expand Up @@ -306,6 +306,7 @@ def data_mnist(
return X_train, Y_train, X_test, Y_test



def data_cifar10(train_start=0, train_end=50000, test_start=0, test_end=10000):
"""
Preprocess CIFAR10 dataset
Expand Down
2 changes: 1 addition & 1 deletion cleverhans_v3.1.0/cleverhans/utils_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

def maybe_download_mnist_file(file_name, datadir=None, force=False):
warnings.warn(utils_mnist_warning)
url = os.path.join("http://yann.lecun.com/exdb/mnist/", file_name)
url = os.path.join('https://storage.googleapis.com/cvdf-datasets/mnist/', file_name)
return dataset.maybe_download_file(url, datadir=None, force=False)


Expand Down

0 comments on commit 42fc431

Please sign in to comment.