You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/19 09:03:24 UTC

[GitHub] pracheer commented on a change in pull request #9135: tutorial for distributed training

pracheer commented on a change in pull request #9135: tutorial for distributed training
URL: https://github.com/apache/incubator-mxnet/pull/9135#discussion_r157688680
 
 

 ##########
 File path: python/mxnet/test_utils.py
 ##########
 @@ -1441,6 +1441,67 @@ def read_data(label_url, image_url):
     return {'train_data':train_img, 'train_label':train_lbl,
             'test_data':test_img, 'test_label':test_lbl}
 
+# download mnist.pkl.gz
+def get_mnist_pkl():
+    if not os.path.isdir("data"):
+        os.makedirs('data')
+    if not os.path.exists('data/mnist.pkl.gz'):
+        download('http://deeplearning.net/data/mnist/mnist.pkl.gz',
+                 dirname='data')
+
+# download ubyte version of mnist and extract
+def get_mnist_ubyte():
+    if not os.path.isdir("data"):
+        os.makedirs('data')
+    if (not os.path.exists('data/train-images-idx3-ubyte')) or \
+            (not os.path.exists('data/train-labels-idx1-ubyte')) or \
+            (not os.path.exists('data/t10k-images-idx3-ubyte')) or \
+            (not os.path.exists('data/t10k-labels-idx1-ubyte')):
+        zip_file_path = download('http://data.mxnet.io/mxnet/data/mnist.zip',
+                                 dirname='data')
+        with zipfile.ZipFile(zip_file_path) as zf:
+            zf.extractall('data')
+
+# download cifar
+def get_cifar10():
 
 Review comment:
   Also, mention in the docstring the place where dataset will be downloaded to. Same for other functions.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services