aboutsummaryrefslogtreecommitdiff
path: root/datasets/mnist
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-08-19 14:20:57 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2016-08-19 14:20:57 -0300
commitb255338295587246292dc978e7d4d5687ee01fb4 (patch)
tree1581b76a03f4929c5132dcb3c6920fa761f8261c /datasets/mnist
parentfbf8d82cdd3720c4bbf2a94035b6779e56d73448 (diff)
Scripts and other files for building all datasets.
Diffstat (limited to 'datasets/mnist')
-rw-r--r--datasets/mnist/mnist_extract.py148
-rw-r--r--datasets/mnist/mnist_test_sample.tbl1000
-rw-r--r--datasets/mnist/mnist_train_sample.tbl1000
-rw-r--r--datasets/mnist/source1
4 files changed, 2149 insertions, 0 deletions
diff --git a/datasets/mnist/mnist_extract.py b/datasets/mnist/mnist_extract.py
new file mode 100644
index 0000000..403b250
--- /dev/null
+++ b/datasets/mnist/mnist_extract.py
@@ -0,0 +1,148 @@
+from array import array as pyarray
+from scipy.io import loadmat
+from sklearn.decomposition import PCA
+
+import gzip
+import hashlib
+import logging
+import numpy as np
+import os
+import os.path
+import struct
+import sys
+import wget
+
+
+TRAIN_IMAGES_URL = "http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz"
+TRAIN_LABELS_URL = "http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz"
+TEST_IMAGES_URL = "http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz"
+TEST_LABELS_URL = "http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz"
+
+TRAIN_IMAGES_SHA256 = "440fcabf73cc546fa21475e81ea370265605f56be210a4024d2ca8f203523609"
+TRAIN_LABELS_SHA256 = "3552534a0a558bbed6aed32b30c495cca23d567ec52cac8be1a0730e8010255c"
+TEST_IMAGES_SHA256 = "8d422c7b0a1c1c79245a5bcf07fe86e33eeafee792b84584aec276f5a2dbc4e6"
+TEST_LABELS_SHA256 = "f7ae60f92e00ec6debd23a6088c31dbd2371eca3ffa0defaefb259924204aec6"
+
+TRAIN_SAMPLE_INDICES_FNAME = "mnist_train_sample.tbl"
+TEST_SAMPLE_INDICES_FNAME = "mnist_test_sample.tbl"
+
+FNAME_IMG = {
+ 'train': 'train-images-idx3-ubyte.gz',
+ 'test': 't10k-images-idx3-ubyte.gz'
+}
+
+FNAME_LBL = {
+ 'train': 'train-labels-idx1-ubyte.gz',
+ 'test': 't10k-labels-idx1-ubyte.gz'
+}
+
+
+def download_and_check(in_url, out_fname, sha256sum):
+ logging.info("Downloading '{}'".format(in_url))
+ wget.download(in_url, out_fname)
+
+ valid = False
+ with open(out_fname, "rb") as f:
+ valid = (hashlib.sha256(f.read()).hexdigest() == sha256sum)
+
+ return valid
+
+
+def load_mnist(data="train", digits=np.arange(10)):
+ fname_img = FNAME_IMG[data]
+ fname_lbl = FNAME_LBL[data]
+
+ with gzip.open(fname_lbl, 'rb') as flbl:
+ magic_nr, size = struct.unpack(">II", flbl.read(8))
+ lbl = pyarray("b", flbl.read())
+
+ with gzip.open(fname_img, 'rb') as fimg:
+ magic_nr, size, rows, cols = struct.unpack(">IIII", fimg.read(16))
+ img = pyarray("B", fimg.read())
+
+ ind = [k for k in range(size) if lbl[k] in digits]
+ N = len(ind)
+
+ images = np.zeros((N, rows*cols), dtype=np.uint8)
+ labels = np.zeros((N, 1), dtype=np.int8)
+ for i in range(len(ind)):
+ m = ind[i]*rows*cols
+ n = (ind[i]+1)*rows*cols
+ images[i] = np.array(img[m:n])
+ labels[i] = lbl[ind[i]]
+
+ return images, labels
+
+
+if __name__ == "__main__":
+ logging.basicConfig(filename="mnist_extract.log",
+ format="%(levelname)s:%(message)s",
+ level=logging.INFO)
+
+ # Get and check original data if needed
+ urls = [TRAIN_IMAGES_URL, TRAIN_LABELS_URL,
+ TEST_IMAGES_URL, TEST_LABELS_URL]
+ fnames = [FNAME_IMG['train'], FNAME_LBL['train'],
+ FNAME_IMG['test'], FNAME_LBL['test']]
+ sha256sums = [TRAIN_IMAGES_SHA256, TRAIN_LABELS_SHA256,
+ TEST_IMAGES_SHA256, TEST_LABELS_SHA256]
+ for url, fname, sha256sum in zip(urls, fnames, sha256sums):
+ if not os.path.exists(fname):
+ ok = download_and_check(url, fname, sha256sum)
+ if not ok:
+ logging.error("'{}' is corrupted; aborting".format(fname))
+ exit(1)
+
+ # We now have the original data
+ logging.info("Loading MNIST training data")
+ mnist_train = dict()
+ mnist_train['train_X'], mnist_train['train_labels'] = load_mnist("train")
+ train_size = mnist_train['train_X'].shape[0]
+
+ logging.info("Loading MNIST test data")
+ mnist_test = dict()
+ mnist_test['test_X'], mnist_test['test_labels'] = load_mnist("test")
+ test_size = mnist_test['test_X'].shape[0]
+
+ should_load_samples = False
+ if len(sys.argv) == 2 \
+ or (not os.path.exists(TRAIN_SAMPLE_INDICES_FNAME)) \
+ or (not os.path.exists(TEST_SAMPLE_INDICES_FNAME)):
+ sample_size = int(sys.argv[1])
+
+ if sample_size/2 > min(train_size, test_size):
+ print("sample size is too large")
+ should_load_samples = True
+ else:
+ logging.info("Generating {} samples".format(sample_size))
+ train_sample_indices = np.randint(0, train_size, sample_size / 2)
+ test_sample_indices = np.randint(0, test_size, sample_size / 2)
+
+ logging.info("Saving generated samples")
+ np.savetxt("mnist_train_sample.tbl", train_sample_indices, fmt="%u")
+ np.savetxt("mnist_test_sample.tbl", test_sample_indices, fmt="%u")
+ else:
+ should_load_samples = True
+
+ if should_load_samples:
+ logging.info("Loading samples")
+ train_sample_indices = np.loadtxt(TRAIN_SAMPLE_INDICES_FNAME, dtype=int)
+ test_sample_indices = np.loadtxt(TEST_SAMPLE_INDICES_FNAME, dtype=int)
+ sample_size = train_sample_indices.shape[0] \
+ + test_sample_indices.shape[0]
+
+ logging.info("Extracting {} samples".format(sample_size))
+ train_samples = mnist_train['train_X'][train_sample_indices, :]
+ test_samples = mnist_test['test_X'][test_sample_indices, :]
+ mnist_sample = np.concatenate((train_samples, test_samples))
+ mnist_sample = PCA(n_components=512, whiten=True).fit_transform(mnist_sample)
+
+ train_labels = mnist_train['train_labels'][train_sample_indices]
+ test_labels = mnist_test['test_labels'][test_sample_indices]
+ mnist_sample_labels = np.concatenate((train_labels, test_labels))
+
+ logging.info("Saving extracted samples and their labels")
+ sample_fname = "mnist_{}.tbl".format(sample_size)
+ labels_fname = "mnist_{}.labels".format(sample_size)
+ np.savetxt(sample_fname, mnist_sample, fmt="%f")
+ np.savetxt(labels_fname, mnist_sample_labels, fmt="%u")
diff --git a/datasets/mnist/mnist_test_sample.tbl b/datasets/mnist/mnist_test_sample.tbl
new file mode 100644
index 0000000..01dbdb4
--- /dev/null
+++ b/datasets/mnist/mnist_test_sample.tbl
@@ -0,0 +1,1000 @@
+3973
+5619
+2531
+173
+2631
+2965
+3560
+4015
+8898
+4444
+1512
+6548
+2198
+6312
+1296
+7560
+5442
+1117
+7187
+3760
+6127
+8284
+5753
+1355
+4525
+7358
+9941
+2250
+3971
+3997
+8080
+1439
+9378
+9748
+3982
+9763
+2350
+1694
+9278
+2478
+4600
+2931
+1877
+2024
+1665
+4573
+9992
+4573
+2805
+3637
+4888
+393
+6974
+342
+1428
+7768
+8996
+6218
+8090
+3170
+9294
+3762
+3572
+6668
+4507
+8653
+7773
+7401
+1864
+8081
+8926
+1423
+2438
+2299
+7662
+7016
+8325
+4795
+2827
+1549
+6415
+1814
+1587
+8541
+3768
+6314
+520
+3211
+3042
+7988
+2437
+8701
+7152
+6116
+6788
+1716
+2574
+222
+2507
+7909
+9310
+2515
+9552
+5978
+2747
+8850
+5236
+7072
+9609
+1773
+1996
+7011
+6411
+6782
+7557
+8347
+8594
+1019
+3593
+7665
+1496
+9937
+8440
+2913
+3808
+6796
+4860
+8834
+8010
+1539
+9196
+8876
+9689
+5137
+1135
+2322
+8701
+7240
+5049
+7570
+6400
+3681
+1554
+9645
+8644
+899
+6195
+4824
+8461
+3274
+7104
+9782
+1217
+4177
+3767
+3524
+6676
+5271
+4171
+1631
+1146
+218
+9407
+3410
+6100
+3513
+4910
+2599
+5342
+9572
+2431
+4692
+7466
+4627
+4954
+614
+1599
+4993
+9468
+1112
+5396
+571
+6039
+7624
+2345
+3136
+7770
+968
+7956
+2759
+1176
+4412
+4011
+8072
+6664
+3271
+2622
+1225
+3539
+3123
+4995
+4203
+8476
+5421
+4099
+7507
+4915
+5903
+2902
+3787
+9845
+626
+5494
+7632
+3265
+2735
+4421
+7779
+1584
+9824
+6218
+6274
+1646
+7492
+9262
+3954
+7870
+5170
+4843
+1354
+6864
+4077
+9041
+7851
+554
+1383
+5010
+83
+2836
+8388
+3615
+6271
+3648
+5977
+6805
+1980
+5002
+3512
+2502
+7348
+5785
+3173
+7501
+5926
+4718
+7266
+6330
+837
+5880
+4539
+1666
+2744
+6435
+8204
+2600
+9381
+7991
+2922
+8758
+3510
+2159
+5589
+9240
+9164
+3487
+82
+8549
+8142
+5323
+2833
+5876
+8804
+5384
+6427
+9445
+8258
+4534
+1401
+4012
+1963
+8864
+1296
+1971
+6865
+5059
+9953
+9929
+3362
+3947
+2774
+7999
+7872
+8911
+8231
+7525
+7673
+9513
+4506
+6972
+4863
+9817
+7406
+2814
+5024
+1235
+6361
+9599
+7879
+3188
+3635
+3510
+3144
+619
+7330
+9709
+9059
+6732
+1336
+6753
+5323
+3225
+7434
+1248
+3561
+9789
+584
+3547
+5062
+684
+683
+9749
+1890
+3295
+3922
+2478
+9084
+2081
+5425
+4698
+2516
+9604
+966
+5215
+3516
+4565
+4994
+9493
+4670
+870
+4205
+2392
+3959
+5435
+8656
+4656
+4864
+5566
+36
+4241
+952
+8403
+8439
+927
+2054
+6004
+9119
+7485
+7909
+4296
+4955
+2010
+1665
+1517
+284
+6760
+6873
+7480
+4833
+9706
+6572
+4516
+7929
+3593
+599
+9033
+7960
+1294
+8328
+2060
+3968
+9377
+6773
+4262
+8589
+6944
+5036
+1168
+3302
+9869
+3937
+6549
+9227
+490
+1144
+8171
+168
+3615
+177
+6932
+1850
+2162
+1383
+9091
+6706
+2185
+378
+8364
+5087
+4923
+8251
+4509
+6684
+5531
+7363
+9608
+2523
+6755
+9274
+3125
+7483
+1757
+5886
+5546
+9232
+7339
+1532
+6687
+2077
+151
+9142
+8634
+4382
+5496
+6438
+190
+8095
+1044
+1185
+5477
+2091
+9776
+9808
+7624
+8804
+5577
+4743
+9430
+9559
+8800
+5013
+6185
+5485
+3654
+6515
+2616
+6941
+8565
+774
+123
+1785
+1295
+5907
+6938
+3834
+8451
+3349
+9035
+8060
+5346
+130
+9765
+2271
+1931
+6623
+5083
+1360
+9246
+418
+9861
+7503
+2337
+9378
+8950
+1058
+9388
+6561
+9052
+2369
+9216
+4447
+3863
+4109
+9174
+4578
+7114
+7682
+1292
+9262
+4037
+9389
+977
+5536
+6542
+4658
+6248
+5812
+5368
+1902
+2241
+3998
+8438
+2537
+7300
+324
+6035
+705
+6183
+6218
+7344
+9178
+5217
+9838
+6091
+7340
+2628
+4193
+3754
+953
+7502
+3565
+4096
+4102
+5243
+2539
+6210
+4066
+9885
+4510
+1014
+6225
+4623
+4070
+9637
+7889
+2956
+7615
+6248
+4692
+9723
+7971
+6075
+9411
+7988
+9494
+2855
+1128
+4452
+2287
+6406
+9620
+3490
+6300
+4194
+976
+4855
+5826
+2230
+8451
+4355
+1056
+5916
+6232
+6178
+7111
+8189
+8229
+4582
+4987
+2504
+5209
+9065
+542
+9704
+5142
+8361
+650
+7443
+9784
+827
+3290
+5941
+7560
+1708
+7139
+9780
+4061
+2787
+1098
+2374
+4307
+474
+2027
+5593
+5711
+7421
+877
+4290
+449
+6847
+5852
+5325
+4446
+265
+2754
+1522
+251
+8177
+8549
+2520
+4924
+6980
+5069
+8282
+3407
+4092
+31
+8512
+2922
+718
+11
+8929
+8633
+543
+3798
+4298
+1608
+5033
+7498
+7880
+8875
+9322
+4915
+4635
+211
+8764
+4584
+3430
+4709
+3673
+4644
+5422
+1496
+1302
+7828
+9634
+9829
+8080
+5497
+7544
+4022
+7035
+9211
+8835
+3730
+3572
+7233
+9559
+8775
+275
+7197
+3020
+4200
+2802
+2257
+3467
+1800
+3972
+416
+5186
+6074
+7911
+6703
+6512
+9216
+771
+4106
+994
+4621
+5264
+4301
+4850
+7139
+2845
+3084
+9974
+5940
+5407
+1302
+6306
+4011
+4588
+4830
+8517
+5363
+1698
+5259
+4667
+4592
+1327
+4744
+5258
+8023
+1070
+8483
+9563
+2784
+7275
+9539
+633
+1612
+2249
+584
+1400
+1746
+4130
+6278
+4132
+1817
+5721
+6304
+7754
+6763
+4966
+4103
+350
+1445
+5864
+5294
+498
+6512
+6985
+1344
+6528
+9555
+6924
+3436
+2995
+4486
+7545
+2166
+1347
+5680
+8737
+2049
+5923
+6491
+8691
+7240
+4321
+9902
+1352
+4586
+6870
+9504
+4282
+814
+5203
+9037
+6233
+4286
+1500
+2867
+411
+2915
+804
+8028
+775
+6782
+9628
+6657
+5371
+8703
+9310
+9727
+3054
+3224
+4925
+6034
+8457
+255
+7549
+8916
+9338
+4516
+6693
+2317
+3229
+5808
+7849
+5907
+6960
+9521
+4025
+6247
+1126
+8732
+2250
+6327
+339
+8920
+532
+6762
+6966
+202
+2118
+4469
+1402
+2608
+3524
+8060
+6309
+2867
+2961
+6588
+2806
+4728
+7695
+3697
+7446
+1861
+3047
+6188
+1553
+7946
+5868
+4599
+1290
+3645
+4893
+7128
+544
+5489
+2054
+5743
+1459
+4830
+6090
+3792
+7530
+1310
+4238
+8773
+2622
+2441
+4483
+4987
+4
+1785
+3994
+8562
+9479
+8214
+3025
+5599
+5541
+3878
+1022
+516
+2749
+947
+9004
+945
+999
+1732
+6760
+3753
+408
+8403
+8616
+8808
+2863
+6291
+2927
+5566
+2551
+6242
+973
+3016
+9882
+4616
+5908
+9717
+494
+6446
+3305
+8158
+957
+8490
+8972
+1272
+700
+6195
+6060
+6416
+5052
+909
+3195
+1410
+8089
+4350
+1384
+568
+2457
+9287
+4669
+5095
+3792
+587
+3252
+2553
+7829
+4747
+387
+5560
+2238
+7800
+7076
+9380
+1121
+7393
+876
+8840
+99
+5336
+4206
+1363
+3166
+4376
+2
+5769
+6015
+3537
+8225
+0
+2105
+3266
+5232
+6300
+1668
+7178
+2302
+9710
+4617
+6516
+4722
+9427
+9090
+3217
+4941
+1897
+7119
+467
+5375
+3561
+418
+4564
+1775
+5244
+1708
+3234
+2402
+7947
+9803
+7822
+151
+8200
+510
+2616
+8291
+5053
diff --git a/datasets/mnist/mnist_train_sample.tbl b/datasets/mnist/mnist_train_sample.tbl
new file mode 100644
index 0000000..0b136db
--- /dev/null
+++ b/datasets/mnist/mnist_train_sample.tbl
@@ -0,0 +1,1000 @@
+57616
+17592
+35740
+20022
+18918
+6515
+47576
+21464
+314
+49504
+44255
+274
+12270
+18426
+47098
+15671
+21746
+15811
+55537
+55389
+13571
+34863
+28102
+37300
+23374
+9773
+45834
+43443
+13699
+32778
+48444
+27905
+39405
+31994
+35449
+2653
+39538
+31644
+55621
+49589
+33400
+48087
+37060
+5615
+24531
+29602
+13300
+40262
+19419
+22407
+59794
+59057
+22781
+58471
+44220
+7522
+51504
+20731
+40111
+23730
+18806
+2268
+48366
+59118
+10441
+52308
+3980
+20045
+43691
+7395
+46980
+31485
+11893
+29599
+59330
+15598
+18435
+30758
+2064
+57422
+7182
+19072
+23953
+38725
+41781
+38145
+16674
+31199
+34283
+36525
+14807
+22142
+38126
+2029
+26729
+12707
+20955
+8202
+41186
+55210
+46653
+53225
+13980
+36439
+38367
+19888
+40442
+22213
+10670
+15121
+33148
+38950
+20949
+47570
+7746
+34761
+34571
+57804
+2342
+44979
+45321
+48538
+31397
+58603
+40334
+11865
+4047
+38967
+41588
+12377
+17679
+59706
+43049
+1111
+47047
+55831
+5013
+20843
+25249
+43546
+39075
+7040
+40238
+55874
+40866
+17630
+40943
+45366
+32838
+7111
+31456
+20075
+57155
+51424
+45547
+55680
+20006
+49687
+51880
+2478
+59925
+8823
+35400
+6391
+6317
+32393
+18334
+33229
+52966
+610
+54534
+4053
+21797
+22954
+57184
+221
+782
+32494
+41319
+43098
+19062
+6984
+6527
+7383
+18878
+50131
+7372
+7476
+13935
+38478
+17870
+23977
+49675
+29469
+40345
+46503
+52574
+54370
+3183
+43099
+32347
+28495
+59102
+30434
+55341
+19146
+39833
+15710
+4594
+8962
+52262
+25213
+13208
+31540
+14932
+10167
+30292
+5674
+53250
+41076
+6776
+27278
+40701
+13723
+25387
+20423
+21282
+56499
+41356
+53193
+17825
+8226
+5938
+10545
+35398
+42341
+5002
+48616
+118
+1854
+19457
+47245
+28034
+26256
+19308
+11119
+40804
+15161
+27192
+57256
+56795
+13757
+21523
+1990
+29060
+16911
+45716
+30104
+47456
+56140
+7129
+44887
+8425
+31547
+45015
+19132
+26316
+21805
+42922
+59318
+56646
+2559
+56001
+27174
+45604
+43889
+7978
+2153
+16063
+3893
+15841
+19827
+50977
+37370
+46923
+59844
+38208
+46018
+41661
+6787
+25298
+31325
+44838
+50220
+29722
+49477
+40492
+27564
+52048
+50522
+39573
+20750
+8455
+22065
+55737
+10024
+44971
+58043
+27397
+47389
+19956
+49412
+9202
+25218
+29632
+19089
+15577
+34808
+50562
+46310
+23015
+20072
+48681
+34695
+56340
+15994
+16476
+22842
+44730
+16490
+45098
+1075
+36609
+17507
+17455
+49243
+14003
+26233
+17753
+801
+37771
+14320
+9597
+8226
+34532
+29634
+32143
+57209
+14431
+3626
+54846
+38836
+27628
+58887
+46146
+7617
+40997
+51786
+48037
+7515
+46117
+737
+6944
+9637
+24650
+19940
+11521
+54289
+10438
+40171
+35118
+52702
+25979
+40534
+45914
+6720
+31211
+37663
+4577
+39590
+51347
+58143
+33514
+10615
+25444
+5506
+15033
+46269
+26080
+48588
+16404
+13579
+40096
+13467
+49872
+59896
+55475
+32428
+12781
+56377
+53077
+56730
+5342
+13619
+39237
+10853
+13016
+20639
+14830
+7664
+41604
+25751
+300
+35102
+19849
+15766
+12979
+31771
+32602
+31761
+43788
+57370
+35274
+18208
+13870
+15842
+2671
+5217
+25586
+57012
+20552
+12579
+26353
+45120
+43146
+15230
+53589
+50219
+50311
+6967
+6167
+7353
+3965
+10934
+9052
+25427
+33921
+42194
+12527
+17364
+10177
+33662
+20745
+32536
+41904
+19963
+22195
+22549
+6632
+9889
+56236
+53022
+35725
+42694
+16032
+38542
+24758
+1802
+40481
+28033
+16730
+27517
+42091
+4849
+18084
+59100
+3990
+27005
+17890
+18074
+19225
+27349
+42790
+5577
+3000
+45881
+18213
+55348
+47812
+33784
+27582
+30
+39035
+24942
+5179
+22934
+7829
+22250
+50897
+52136
+4512
+54522
+33580
+57999
+6
+17499
+44035
+33174
+46357
+6980
+48263
+25670
+51411
+47402
+12477
+28570
+29781
+1105
+46944
+52178
+27981
+1945
+3431
+11008
+1925
+55090
+17868
+24114
+30978
+6540
+11376
+14505
+44289
+47336
+32765
+58824
+29040
+25884
+46350
+21710
+56361
+28692
+27269
+36220
+49106
+13907
+37738
+12228
+38044
+12753
+20518
+46432
+29569
+14361
+42860
+46855
+4726
+29445
+52094
+21769
+42226
+24806
+45423
+55215
+39094
+46734
+17129
+3640
+36628
+56080
+48031
+49386
+3173
+9713
+1636
+45135
+23810
+8566
+3271
+34111
+3968
+34837
+14182
+56039
+29414
+2625
+26194
+1865
+9577
+9867
+9636
+21600
+28828
+53985
+31700
+43341
+15693
+51745
+11953
+5350
+24821
+13598
+57255
+25230
+37624
+12629
+41842
+8366
+57945
+39079
+44896
+59269
+30424
+38785
+19199
+33009
+8067
+42738
+52697
+34452
+23321
+14719
+48976
+29272
+23271
+56086
+20336
+52107
+11830
+50826
+37389
+46229
+21872
+9314
+23795
+9193
+52074
+21327
+47624
+11887
+49012
+54328
+20828
+3109
+49819
+25723
+34310
+59136
+19174
+16688
+21371
+29697
+38450
+42881
+25583
+20355
+3672
+22386
+53670
+40080
+56620
+58651
+5132
+45963
+26799
+37046
+55683
+34252
+57630
+6523
+25146
+12865
+51186
+39016
+27828
+56666
+18486
+58665
+56209
+53839
+41163
+3409
+4117
+37738
+27035
+21013
+10042
+6348
+41410
+5989
+17595
+28447
+53010
+3887
+20584
+210
+51431
+58339
+59181
+28704
+54516
+32421
+17650
+34597
+40747
+8175
+47896
+46883
+13524
+37808
+53754
+434
+37154
+4800
+26379
+6292
+59644
+3665
+24044
+54544
+7689
+18424
+47761
+31404
+13379
+34133
+3885
+32757
+5936
+52907
+28721
+29113
+20960
+21089
+23480
+55886
+15426
+59779
+23741
+41373
+58737
+18447
+11813
+37271
+34253
+43787
+20375
+9676
+21516
+6112
+44909
+45557
+18346
+11669
+7183
+48922
+27542
+40695
+16962
+49353
+32351
+16987
+12825
+1687
+45980
+47744
+15279
+53463
+34186
+18334
+51386
+46662
+17011
+33724
+31658
+5435
+36696
+43562
+30754
+57056
+44728
+22622
+23268
+19760
+44223
+19033
+58856
+24768
+45390
+6111
+27347
+19049
+58364
+53201
+26508
+28685
+49889
+32145
+24442
+50683
+29089
+58209
+11491
+31186
+44327
+28716
+2250
+35204
+9207
+34721
+8905
+30420
+50198
+6715
+25686
+37755
+33949
+48826
+45839
+53569
+37224
+48830
+10076
+51664
+36094
+24915
+19176
+52754
+43065
+43369
+56068
+17771
+21623
+37085
+1651
+33232
+51024
+38208
+31317
+38383
+13661
+35438
+46183
+37855
+37947
+14860
+3413
+55236
+19724
+7523
+1800
+18376
+52348
+19879
+53325
+50800
+53410
+57100
+15450
+51173
+19816
+15163
+36804
+33383
+36498
+29529
+14041
+23527
+14687
+17229
+26800
+26413
+22147
+9450
+52830
+24639
+49517
+48152
+50283
+52594
+15371
+40367
+43886
+45651
+44733
+17024
+44066
+55340
+11711
+59444
+57575
+50352
+37853
+15395
+50645
+4514
+24351
+55141
+32242
+18352
+30645
+53462
+32026
+15911
+47859
+2325
+2040
+20152
+16447
+7861
+32277
+45087
+29190
+50412
+26261
+13543
+32734
+5702
+24248
+12978
+10042
+57447
+499
+32466
+18431
+58556
+43702
+63
+9529
+15490
+23804
+1759
+52811
+16673
+18573
+5664
+28446
+26391
+45384
+48015
+57691
+4717
+46134
+27084
+39128
+28829
+24662
+22151
+3268
+55806
+24820
+51857
+19078
+1096
+10933
+12914
+8356
+44247
+33466
+27531
+1580
+51242
+5040
+15635
+4654
+55430
+37081
+26232
+18655
+32103
+42792
+57232
+57450
+57955
+25265
+20074
+56113
+22123
+26840
+10551
+58099
+13944
+37154
+437
+19498
+55523
+31750
+19266
+27300
+2007
+22425
+4642
+1862
+45703
+18243
+45478
+16779
+57440
+19256
+9985
diff --git a/datasets/mnist/source b/datasets/mnist/source
new file mode 100644
index 0000000..19ebae4
--- /dev/null
+++ b/datasets/mnist/source
@@ -0,0 +1 @@
+http://yann.lecun.com/exdb/mnist/