import os
__version__ = "0.0.1"


# Hotfix for MNIST download issue
def _adapt_dataset_urls():
    from torchvision.datasets import MNIST
    prev_mnist_urls = MNIST.resources
    new_resources = [
        ('https://storage.googleapis.com/cvdf-datasets/mnist/'
         'train-images-idx3-ubyte.gz', prev_mnist_urls[0][1]),
        ('https://storage.googleapis.com/cvdf-datasets/mnist/'
         'train-labels-idx1-ubyte.gz', prev_mnist_urls[1][1]),
        ('https://storage.googleapis.com/cvdf-datasets/mnist/'
         't10k-images-idx3-ubyte.gz', prev_mnist_urls[2][1]),
        ('https://storage.googleapis.com/cvdf-datasets/mnist/'
         't10k-labels-idx1-ubyte.gz', prev_mnist_urls[3][1])
    ]
    MNIST.resources = new_resources


_adapt_dataset_urls()

@@ -180,16 +180,18 @@
 ces%0D%0A   
+ #
  new_res
@@ -201,24 +201,26 @@
 ces = %5B%0D%0A   
+ #
      ('https
@@ -268,29 +268,31 @@
 nist/'%0D%0A    
+#
      
+ 
 'train-image
@@ -329,32 +329,34 @@
 rls%5B0%5D%5B1%5D),%0D%0A   
+ #
      ('https://s
@@ -404,21 +404,23 @@
 /'%0D%0A    
+#
      
+ 
 'train-l
@@ -461,32 +461,34 @@
 rls%5B1%5D%5B1%5D),%0D%0A   
+ #
      ('https://s
@@ -532,29 +532,31 @@
 nist/'%0D%0A    
+#
      
+ 
 't10k-images
@@ -601,20 +601,22 @@
 ),%0D%0A    
+#
     
+ 
 ('https:
@@ -659,24 +659,537 @@
 ts/mnist/'%0D%0A
+    #      't10k-labels-idx1-ubyte.gz', prev_mnist_urls%5B3%5D%5B1%5D)%0D%0A    # %5D%0D%0A%0D%0A    new_resources = %5B%0D%0A        ('https://github.com/mkolod/MNIST/raw/master/'%0D%0A         'train-images-idx3-ubyte.gz', prev_mnist_urls%5B0%5D%5B1%5D),%0D%0A        ('https://github.com/mkolod/MNIST/raw/master/'%0D%0A         'train-labels-idx1-ubyte.gz', prev_mnist_urls%5B1%5D%5B1%5D),%0D%0A        ('https://github.com/mkolod/MNIST/raw/master/'%0D%0A         't10k-images-idx3-ubyte.gz', prev_mnist_urls%5B2%5D%5B1%5D),%0D%0A        ('https://github.com/mkolod/MNIST/raw/master/'%0D%0A
          't1
@@ -1245,16 +1245,18 @@
 %0A    %5D%0D%0A
+%0D%0A
     MNIS

edit mirror for mnist data