In [2]:
# standard libraries
import logging
# third-party imports
from opendeep.log.logger import config_root_logger
import opendeep.data.dataset as datasets
from opendeep.data.standard_datasets.image.mnist import MNIST
from opendeep.models.single_layer.autoencoder import DenoisingAutoencoder
from opendeep.optimization.adadelta import AdaDelta
In [3]:
# grab the logger to record our progress
log = logging.getLogger(__name__)
# set up the logging to display to std.out and files.
config_root_logger()
log.info("Creating a new Denoising Autoencoder")
WARNING:opendeep:Could not find configuration file for logger! Was looking for /Users/dikien/anaconda/lib/python2.7/site-packages/opendeep-0.0.8a0-py2.7.egg/opendeep/log/logging_config.json. Using basicConfig instead...
In [4]:
# grab the MNIST dataset
mnist = MNIST()
In [13]:
# define some model configuration parameters
config = {
"input_size": 28*28, # dimensions of the MNIST images
"hidden_size": 1500 # number of hidden units - generally bigger than input size
}
In [15]:
# create the denoising autoencoder
dae = DenoisingAutoencoder(**config)
WARNING:opendeep.models.model:No output_size given! Make sure this is from a generative model (where output_size is thesame as input_size. Setting output_size=input_size now...
In [16]:
# create the optimizer to train the denoising autoencoder
# AdaDelta is normally a good generic optimizer
optimizer = AdaDelta(dae, mnist)
# train the model!
optimizer.train()
In [20]:
optimizer.__dict__
Out[20]:
{'STOP': True,
'args': {'batch_size': 100,
'dataset': <opendeep.data.standard_datasets.image.mnist.MNIST at 0x1075a08d0>,
'decay': 0.95,
'early_stop_length': 100,
'early_stop_threshold': 1.0,
'learning_rate': 1e-06,
'lr_decay': None,
'lr_factor': None,
'minimum_batch_size': 1,
'model': <opendeep.models.single_layer.autoencoder.DenoisingAutoencoder at 0x11770eed0>,
'n_epoch': 10,
'save_frequency': 1000000},
'batch_size': 100,
'best_cost': 95.140561193364874,
'best_params': [array([[ -1.60382679e-02, -1.95603418e-02, 2.29643947e-02, ...,
2.72980838e-02, -2.87277582e-02, 3.33147005e-02],
[ 7.90650947e-04, -2.96060236e-02, 4.72436096e-03, ...,
-2.13807992e-02, 2.02717439e-02, 1.80715625e-02],
[ 4.12927557e-02, 1.26381173e-03, 4.00839966e-02, ...,
-1.75422259e-02, -9.38459635e-03, -2.46925128e-03],
...,
[ -1.61777292e-02, 3.33168976e-04, 4.05608001e-02, ...,
-2.81661830e-02, 1.27050588e-02, -2.33151942e-02],
[ -1.87224022e-02, 1.26583555e-03, 3.58980956e-02, ...,
3.69356039e-03, -1.10452811e-05, 5.96269118e-03],
[ 1.54382099e-02, -2.35304428e-02, -2.97231839e-03, ...,
3.58316440e-02, -1.19391349e-02, -5.78900262e-04]]),
array([-0.82593429, -0.82707908, -0.82625287, -0.82485223, -0.83758731,
-0.83014375, -0.82974499, -0.81536017, -0.82006896, -0.83089589,
-0.82069596, -0.81996785, -0.82862111, -0.82792791, -0.82192653,
-0.8305427 , -0.81443869, -0.83043664, -0.82209594, -0.8138987 ,
-0.83208854, -0.82018309, -0.82903321, -0.82645282, -0.83089113,
-0.82909151, -0.82222225, -0.82806451, -0.82977901, -0.81796719,
-0.82659298, -0.82410685, -0.8167994 , -0.83275481, -0.83118378,
-0.82186322, -0.82406135, -0.82160201, -0.83404904, -0.82748956,
-0.82409607, -0.82108088, -0.82469035, -0.83579116, -0.82956076,
-0.82430823, -0.83119717, -0.83008402, -0.83443549, -0.82316651,
-0.8212884 , -0.82979359, -0.82527413, -0.82767532, -0.83110107,
-0.83285075, -0.82991425, -0.82366449, -0.82385133, -0.81875464,
-0.82695165, -0.82292408, -0.82678204, -0.81974611, -0.82126575,
-0.82423418, -0.83176663, -0.82603786, -0.83235649, -0.83200106,
-0.83997593, -0.83696955, -0.83917614, -0.8397341 , -0.82908225,
-0.83355046, -0.82949326, -0.82087529, -0.82797558, -0.82839267,
-0.82625748, -0.83227414, -0.82734597, -0.82543832, -0.83175 ,
-0.82332089, -0.82661143, -0.81915207, -0.82791433, -0.82879328,
-0.83253389, -0.82864039, -0.82439512, -0.8313339 , -0.84321462,
-0.83810928, -0.85647825, -0.85754063, -0.85984014, -0.87847382,
-0.87361558, -0.86967546, -0.85552204, -0.85035278, -0.83366847,
-0.83216379, -0.82898929, -0.81993863, -0.81803926, -0.83469799,
-0.8213889 , -0.82317896, -0.82705384, -0.8338095 , -0.82209379,
-0.82742585, -0.83132504, -0.8239408 , -0.83228541, -0.83198721,
-0.83905199, -0.87178507, -0.87871001, -0.90472487, -0.93419962,
-0.9688036 , -0.99628633, -0.99165958, -0.99762057, -0.97582074,
-0.93897421, -0.911691 , -0.88420687, -0.85181185, -0.8384189 ,
-0.83233023, -0.82001851, -0.82384671, -0.82816136, -0.82550104,
-0.82443694, -0.81465359, -0.81984878, -0.82206435, -0.83103937,
-0.83345665, -0.83991436, -0.84666834, -0.88129401, -0.91983168,
-0.95967755, -1.00112121, -1.04771832, -1.09613111, -1.13850812,
-1.15906656, -1.1583781 , -1.12423084, -1.06733573, -1.00936827,
-0.96103051, -0.91338415, -0.86573672, -0.84276783, -0.8367055 ,
-0.82421256, -0.82267411, -0.824156 , -0.8193988 , -0.81870566,
-0.82334129, -0.83227492, -0.82729239, -0.8391106 , -0.85295293,
-0.89182565, -0.92660999, -0.99109038, -1.04044377, -1.09267435,
-1.15662422, -1.21249143, -1.25029817, -1.27713693, -1.2711717 ,
-1.2327778 , -1.16661354, -1.10474134, -1.02630906, -0.95955335,
-0.89765643, -0.86558086, -0.84213432, -0.83381749, -0.82482293,
-0.82841225, -0.83295964, -0.82864595, -0.824041 , -0.82375431,
-0.82896743, -0.85391805, -0.88754693, -0.93045719, -0.99285954,
-1.04323214, -1.11477249, -1.18085956, -1.22662889, -1.28003414,
-1.314112 , -1.34209151, -1.32954544, -1.30701319, -1.24955559,
-1.16431023, -1.08425953, -0.99742019, -0.93645485, -0.88129945,
-0.85327507, -0.82942398, -0.82346027, -0.82299078, -0.82491072,
-0.82787164, -0.82758297, -0.8313177 , -0.84389157, -0.86848821,
-0.90227516, -0.96049416, -1.0340416 , -1.10547302, -1.16621305,
-1.21124811, -1.2466397 , -1.26635755, -1.28503794, -1.28699339,
-1.29099828, -1.28630152, -1.26418639, -1.19873208, -1.11443017,
-1.04198914, -0.95482131, -0.89583894, -0.86056433, -0.83789048,
-0.8271081 , -0.83049109, -0.82258588, -0.8177186 , -0.8193227 ,
-0.83240875, -0.85128413, -0.87989089, -0.92355482, -0.99389398,
-1.05235655, -1.13530176, -1.1877229 , -1.2201143 , -1.21861684,
-1.21005888, -1.21488418, -1.22428136, -1.24152634, -1.25833476,
-1.23662806, -1.19656508, -1.11696745, -1.04338286, -0.96173514,
-0.89546428, -0.85306906, -0.83748899, -0.82984309, -0.83219015,
-0.82798351, -0.82155551, -0.82743156, -0.83252831, -0.83839001,
-0.86899033, -0.93273117, -1.0050719 , -1.07921209, -1.149555 ,
-1.19191432, -1.19266983, -1.16272203, -1.15097036, -1.15282571,
-1.17563793, -1.20217266, -1.22273931, -1.21495976, -1.17000928,
-1.10185511, -1.03585167, -0.95741803, -0.8915019 , -0.84976411,
-0.82174388, -0.81960597, -0.82487174, -0.8199666 , -0.8232677 ,
-0.83039368, -0.82604589, -0.84174181, -0.86987531, -0.93219021,
-1.01293439, -1.09020415, -1.15819163, -1.17395439, -1.16179138,
-1.12553111, -1.12232129, -1.13391138, -1.17691735, -1.20422151,
-1.22190069, -1.20930108, -1.15858193, -1.08344634, -1.01338109,
-0.94073454, -0.88768845, -0.83112544, -0.82693924, -0.83236537,
-0.82705449, -0.83130319, -0.8167356 , -0.82312981, -0.82373939,
-0.8431036 , -0.88828341, -0.94336119, -1.02598497, -1.10866965,
-1.15561892, -1.16720613, -1.14033506, -1.11112282, -1.13189405,
-1.16188017, -1.21674481, -1.25204846, -1.24378829, -1.20557353,
-1.14328984, -1.06021437, -0.99375066, -0.93299421, -0.88737856,
-0.84226525, -0.83308316, -0.81567477, -0.82761687, -0.82262239,
-0.82299097, -0.81735031, -0.82923659, -0.8338541 , -0.88748767,
-0.95588805, -1.04163863, -1.11167814, -1.14931078, -1.16026786,
-1.13828127, -1.14098942, -1.18842642, -1.23401923, -1.27684678,
-1.29945473, -1.26526682, -1.20494546, -1.12822741, -1.0508676 ,
-0.99283067, -0.93770649, -0.89874655, -0.8497405 , -0.8321413 ,
-0.82039566, -0.82515526, -0.82539683, -0.82692547, -0.82332201,
-0.82194958, -0.83515598, -0.88791638, -0.96444298, -1.03568364,
-1.12066558, -1.15381015, -1.16136243, -1.15596401, -1.19626221,
-1.25184633, -1.28407386, -1.34771284, -1.31572256, -1.26412281,
-1.19967823, -1.1293052 , -1.05582679, -0.99888046, -0.94480277,
-0.9004708 , -0.85059526, -0.83419061, -0.82569799, -0.82374165,
-0.82754702, -0.82227705, -0.82134402, -0.82302724, -0.83198861,
-0.89548494, -0.97186033, -1.04970959, -1.1006821 , -1.13977866,
-1.15447514, -1.15711808, -1.21899754, -1.281446 , -1.30612545,
-1.34930368, -1.29058212, -1.23906505, -1.19030167, -1.12552102,
-1.06293828, -1.00263891, -0.95704393, -0.90209513, -0.85545968,
-0.83395815, -0.82497965, -0.81696698, -0.82996125, -0.83048774,
-0.82900423, -0.82532187, -0.84274824, -0.89869959, -0.97183865,
-1.03868585, -1.08880805, -1.10984306, -1.13111658, -1.1582506 ,
-1.21004745, -1.25810095, -1.28950785, -1.29937617, -1.25087785,
-1.20922473, -1.1702771 , -1.12187439, -1.05506314, -1.00353725,
-0.94506291, -0.89473218, -0.85700522, -0.82445311, -0.82590094,
-0.82479947, -0.82596135, -0.83485979, -0.82595049, -0.82262353,
-0.84527357, -0.9061316 , -0.97803016, -1.03238915, -1.05885023,
-1.08267874, -1.10419457, -1.13349219, -1.16863773, -1.20501687,
-1.2549925 , -1.24166441, -1.22513237, -1.19534478, -1.16351275,
-1.12075806, -1.0592713 , -1.00519355, -0.9395308 , -0.88693644,
-0.85774471, -0.82652266, -0.83407676, -0.81321625, -0.82239929,
-0.82383914, -0.81483795, -0.82285471, -0.85303549, -0.91512263,
-0.9810163 , -1.02456676, -1.06214794, -1.07545538, -1.09368357,
-1.11202381, -1.15239406, -1.1898438 , -1.22452637, -1.22703193,
-1.21992555, -1.19978655, -1.17268671, -1.11593948, -1.05781924,
-0.99481918, -0.9327997 , -0.8781584 , -0.85143919, -0.82778809,
-0.82452071, -0.81416649, -0.82838519, -0.82388463, -0.82566108,
-0.83017708, -0.85928118, -0.9236934 , -0.98125351, -1.03438322,
-1.06180353, -1.1027075 , -1.12168599, -1.14670892, -1.17663333,
-1.20829445, -1.23776731, -1.24451344, -1.23070478, -1.21361147,
-1.17642813, -1.104775 , -1.03909054, -0.9672263 , -0.91418332,
-0.87302354, -0.84420767, -0.8288976 , -0.8261231 , -0.8217239 ,
-0.82267352, -0.83437796, -0.8296032 , -0.82731501, -0.85943345,
-0.91036366, -0.97492517, -1.03484239, -1.08665927, -1.13274763,
-1.17351192, -1.19585193, -1.23597527, -1.25888556, -1.27733242,
-1.28172553, -1.25116902, -1.2052498 , -1.15513664, -1.07189127,
-1.00126568, -0.94586659, -0.8883231 , -0.85445139, -0.83860553,
-0.83431009, -0.83975819, -0.83031607, -0.81970608, -0.82681585,
-0.82665522, -0.82888286, -0.84502802, -0.8858701 , -0.95641747,
-1.01828365, -1.08528081, -1.14456665, -1.20299292, -1.25011684,
-1.28809746, -1.31064909, -1.310772 , -1.27678152, -1.22373327,
-1.16615113, -1.09530728, -1.0154876 , -0.94347013, -0.89854954,
-0.86359386, -0.8461579 , -0.83560947, -0.82334521, -0.81935006,
-0.81849655, -0.82824877, -0.82066953, -0.82114258, -0.82203644,
-0.84774532, -0.85610798, -0.92079575, -0.97874937, -1.04924435,
-1.12625296, -1.19113388, -1.24341203, -1.28488663, -1.29086155,
-1.26709855, -1.23198276, -1.15763268, -1.0828391 , -1.02162208,
-0.95778209, -0.89880639, -0.86945173, -0.84944004, -0.83431577,
-0.81261305, -0.8219606 , -0.82527619, -0.81942723, -0.82140721,
-0.82829235, -0.82583175, -0.82191698, -0.8297332 , -0.83211711,
-0.86520607, -0.91800391, -0.97641852, -1.04098337, -1.10570292,
-1.16546533, -1.18401177, -1.19120625, -1.16954458, -1.12234825,
-1.05723803, -0.99306261, -0.94394116, -0.89979896, -0.86896903,
-0.84526202, -0.83452729, -0.83148186, -0.82457842, -0.83366085,
-0.82394734, -0.82918748, -0.82742051, -0.81898452, -0.81858078,
-0.8305961 , -0.82521764, -0.82846764, -0.83923348, -0.85002341,
-0.8829472 , -0.92175965, -0.96343873, -0.991 , -1.02208383,
-1.01709716, -1.00792478, -0.9753815 , -0.94067345, -0.90938632,
-0.88274245, -0.85998619, -0.83683616, -0.83543757, -0.82593979,
-0.8338694 , -0.82599517, -0.83077843, -0.82792504, -0.81689521,
-0.81837014, -0.82812349, -0.82126524, -0.82064637, -0.8276516 ,
-0.83003486, -0.83494758, -0.82795146, -0.84559434, -0.86961656,
-0.87436973, -0.89061919, -0.90330422, -0.89481871, -0.8878948 ,
-0.89149363, -0.86915164, -0.8542412 , -0.8502746 , -0.83534013,
-0.827632 , -0.83214245, -0.83154591, -0.82766395, -0.81945462,
-0.83024025, -0.83072102, -0.82790839, -0.82418584, -0.83103816,
-0.82473208, -0.82619682, -0.82535684, -0.82985397, -0.82610221,
-0.83219432, -0.82607246, -0.84159294, -0.84069889, -0.84703127,
-0.85288196, -0.85553896, -0.85099389, -0.84750108, -0.83991306,
-0.83439431, -0.83198991, -0.8325036 , -0.83043734, -0.81896122,
-0.83089306, -0.83024365, -0.824272 , -0.82138544, -0.8206965 ,
-0.82808734, -0.82286399, -0.82498554, -0.82707993, -0.82219958,
-0.82684951, -0.82456165, -0.8249332 , -0.82974637, -0.82598432,
-0.82728847, -0.8226977 , -0.82347663, -0.82689963, -0.82418662,
-0.82370167, -0.8302123 , -0.83580281, -0.82634487, -0.82869917,
-0.82912682, -0.81964731, -0.82457981, -0.8185394 , -0.83461348,
-0.81838065, -0.82076551, -0.82457577, -0.81792445]),
array([-1.4914006 , -1.15873608, -0.50515147, ..., -0.25118033,
-0.3124174 , -0.10534789])],
'dataset': <opendeep.data.standard_datasets.image.mnist.MNIST at 0x1075a08d0>,
'decay': 0.95,
'early_stop_length': 100,
'early_stop_threshold': 1.0,
'epoch_counter': 10,
'gradients': [OrderedDict([(W_0_1, Elemwise{add,no_inplace}.0), (b_0, DimShuffle{1}.0), (b_1, DimShuffle{1}.0)])],
'learning_rate': learning_rate,
'learning_rate_decay': False,
'lr_scalers': {},
'minimum_batch_size': 1,
'model': <opendeep.models.single_layer.autoencoder.DenoisingAutoencoder at 0x11770eed0>,
'n_epoch': 10,
'noise_switches': [],
'params': [W_0_1, b_0, b_1],
'patience': 0,
'save_frequency': 1000000,
'test_batches': [(0, 100),
(100, 200),
(200, 300),
(300, 400),
(400, 500),
(500, 600),
(600, 700),
(700, 800),
(800, 900),
(900, 1000),
(1000, 1100),
(1100, 1200),
(1200, 1300),
(1300, 1400),
(1400, 1500),
(1500, 1600),
(1600, 1700),
(1700, 1800),
(1800, 1900),
(1900, 2000),
(2000, 2100),
(2100, 2200),
(2200, 2300),
(2300, 2400),
(2400, 2500),
(2500, 2600),
(2600, 2700),
(2700, 2800),
(2800, 2900),
(2900, 3000),
(3000, 3100),
(3100, 3200),
(3200, 3300),
(3300, 3400),
(3400, 3500),
(3500, 3600),
(3600, 3700),
(3700, 3800),
(3800, 3900),
(3900, 4000),
(4000, 4100),
(4100, 4200),
(4200, 4300),
(4300, 4400),
(4400, 4500),
(4500, 4600),
(4600, 4700),
(4700, 4800),
(4800, 4900),
(4900, 5000),
(5000, 5100),
(5100, 5200),
(5200, 5300),
(5300, 5400),
(5400, 5500),
(5500, 5600),
(5600, 5700),
(5700, 5800),
(5800, 5900),
(5900, 6000),
(6000, 6100),
(6100, 6200),
(6200, 6300),
(6300, 6400),
(6400, 6500),
(6500, 6600),
(6600, 6700),
(6700, 6800),
(6800, 6900),
(6900, 7000),
(7000, 7100),
(7100, 7200),
(7200, 7300),
(7300, 7400),
(7400, 7500),
(7500, 7600),
(7600, 7700),
(7700, 7800),
(7800, 7900),
(7900, 8000),
(8000, 8100),
(8100, 8200),
(8200, 8300),
(8300, 8400),
(8400, 8500),
(8500, 8600),
(8600, 8700),
(8700, 8800),
(8800, 8900),
(8900, 9000),
(9000, 9100),
(9100, 9200),
(9200, 9300),
(9300, 9400),
(9400, 9500),
(9500, 9600),
(9600, 9700),
(9700, 9800),
(9800, 9900),
(9900, 10000)],
'test_flag': False,
'test_monitor_function': None,
'test_monitors_dict': {},
'test_monitors_outservice_dict': {},
'times': [42.76060199737549,
44.113073110580444,
43.859454870224,
42.45460605621338,
43.074462890625,
40.63122797012329,
42.34625291824341,
42.0173659324646,
43.141201972961426,
42.10553503036499],
'train_batches': [(0, 100),
(100, 200),
(200, 300),
(300, 400),
(400, 500),
(500, 600),
(600, 700),
(700, 800),
(800, 900),
(900, 1000),
(1000, 1100),
(1100, 1200),
(1200, 1300),
(1300, 1400),
(1400, 1500),
(1500, 1600),
(1600, 1700),
(1700, 1800),
(1800, 1900),
(1900, 2000),
(2000, 2100),
(2100, 2200),
(2200, 2300),
(2300, 2400),
(2400, 2500),
(2500, 2600),
(2600, 2700),
(2700, 2800),
(2800, 2900),
(2900, 3000),
(3000, 3100),
(3100, 3200),
(3200, 3300),
(3300, 3400),
(3400, 3500),
(3500, 3600),
(3600, 3700),
(3700, 3800),
(3800, 3900),
(3900, 4000),
(4000, 4100),
(4100, 4200),
(4200, 4300),
(4300, 4400),
(4400, 4500),
(4500, 4600),
(4600, 4700),
(4700, 4800),
(4800, 4900),
(4900, 5000),
(5000, 5100),
(5100, 5200),
(5200, 5300),
(5300, 5400),
(5400, 5500),
(5500, 5600),
(5600, 5700),
(5700, 5800),
(5800, 5900),
(5900, 6000),
(6000, 6100),
(6100, 6200),
(6200, 6300),
(6300, 6400),
(6400, 6500),
(6500, 6600),
(6600, 6700),
(6700, 6800),
(6800, 6900),
(6900, 7000),
(7000, 7100),
(7100, 7200),
(7200, 7300),
(7300, 7400),
(7400, 7500),
(7500, 7600),
(7600, 7700),
(7700, 7800),
(7800, 7900),
(7900, 8000),
(8000, 8100),
(8100, 8200),
(8200, 8300),
(8300, 8400),
(8400, 8500),
(8500, 8600),
(8600, 8700),
(8700, 8800),
(8800, 8900),
(8900, 9000),
(9000, 9100),
(9100, 9200),
(9200, 9300),
(9300, 9400),
(9400, 9500),
(9500, 9600),
(9600, 9700),
(9700, 9800),
(9800, 9900),
(9900, 10000),
(10000, 10100),
(10100, 10200),
(10200, 10300),
(10300, 10400),
(10400, 10500),
(10500, 10600),
(10600, 10700),
(10700, 10800),
(10800, 10900),
(10900, 11000),
(11000, 11100),
(11100, 11200),
(11200, 11300),
(11300, 11400),
(11400, 11500),
(11500, 11600),
(11600, 11700),
(11700, 11800),
(11800, 11900),
(11900, 12000),
(12000, 12100),
(12100, 12200),
(12200, 12300),
(12300, 12400),
(12400, 12500),
(12500, 12600),
(12600, 12700),
(12700, 12800),
(12800, 12900),
(12900, 13000),
(13000, 13100),
(13100, 13200),
(13200, 13300),
(13300, 13400),
(13400, 13500),
(13500, 13600),
(13600, 13700),
(13700, 13800),
(13800, 13900),
(13900, 14000),
(14000, 14100),
(14100, 14200),
(14200, 14300),
(14300, 14400),
(14400, 14500),
(14500, 14600),
(14600, 14700),
(14700, 14800),
(14800, 14900),
(14900, 15000),
(15000, 15100),
(15100, 15200),
(15200, 15300),
(15300, 15400),
(15400, 15500),
(15500, 15600),
(15600, 15700),
(15700, 15800),
(15800, 15900),
(15900, 16000),
(16000, 16100),
(16100, 16200),
(16200, 16300),
(16300, 16400),
(16400, 16500),
(16500, 16600),
(16600, 16700),
(16700, 16800),
(16800, 16900),
(16900, 17000),
(17000, 17100),
(17100, 17200),
(17200, 17300),
(17300, 17400),
(17400, 17500),
(17500, 17600),
(17600, 17700),
(17700, 17800),
(17800, 17900),
(17900, 18000),
(18000, 18100),
(18100, 18200),
(18200, 18300),
(18300, 18400),
(18400, 18500),
(18500, 18600),
(18600, 18700),
(18700, 18800),
(18800, 18900),
(18900, 19000),
(19000, 19100),
(19100, 19200),
(19200, 19300),
(19300, 19400),
(19400, 19500),
(19500, 19600),
(19600, 19700),
(19700, 19800),
(19800, 19900),
(19900, 20000),
(20000, 20100),
(20100, 20200),
(20200, 20300),
(20300, 20400),
(20400, 20500),
(20500, 20600),
(20600, 20700),
(20700, 20800),
(20800, 20900),
(20900, 21000),
(21000, 21100),
(21100, 21200),
(21200, 21300),
(21300, 21400),
(21400, 21500),
(21500, 21600),
(21600, 21700),
(21700, 21800),
(21800, 21900),
(21900, 22000),
(22000, 22100),
(22100, 22200),
(22200, 22300),
(22300, 22400),
(22400, 22500),
(22500, 22600),
(22600, 22700),
(22700, 22800),
(22800, 22900),
(22900, 23000),
(23000, 23100),
(23100, 23200),
(23200, 23300),
(23300, 23400),
(23400, 23500),
(23500, 23600),
(23600, 23700),
(23700, 23800),
(23800, 23900),
(23900, 24000),
(24000, 24100),
(24100, 24200),
(24200, 24300),
(24300, 24400),
(24400, 24500),
(24500, 24600),
(24600, 24700),
(24700, 24800),
(24800, 24900),
(24900, 25000),
(25000, 25100),
(25100, 25200),
(25200, 25300),
(25300, 25400),
(25400, 25500),
(25500, 25600),
(25600, 25700),
(25700, 25800),
(25800, 25900),
(25900, 26000),
(26000, 26100),
(26100, 26200),
(26200, 26300),
(26300, 26400),
(26400, 26500),
(26500, 26600),
(26600, 26700),
(26700, 26800),
(26800, 26900),
(26900, 27000),
(27000, 27100),
(27100, 27200),
(27200, 27300),
(27300, 27400),
(27400, 27500),
(27500, 27600),
(27600, 27700),
(27700, 27800),
(27800, 27900),
(27900, 28000),
(28000, 28100),
(28100, 28200),
(28200, 28300),
(28300, 28400),
(28400, 28500),
(28500, 28600),
(28600, 28700),
(28700, 28800),
(28800, 28900),
(28900, 29000),
(29000, 29100),
(29100, 29200),
(29200, 29300),
(29300, 29400),
(29400, 29500),
(29500, 29600),
(29600, 29700),
(29700, 29800),
(29800, 29900),
(29900, 30000),
(30000, 30100),
(30100, 30200),
(30200, 30300),
(30300, 30400),
(30400, 30500),
(30500, 30600),
(30600, 30700),
(30700, 30800),
(30800, 30900),
(30900, 31000),
(31000, 31100),
(31100, 31200),
(31200, 31300),
(31300, 31400),
(31400, 31500),
(31500, 31600),
(31600, 31700),
(31700, 31800),
(31800, 31900),
(31900, 32000),
(32000, 32100),
(32100, 32200),
(32200, 32300),
(32300, 32400),
(32400, 32500),
(32500, 32600),
(32600, 32700),
(32700, 32800),
(32800, 32900),
(32900, 33000),
(33000, 33100),
(33100, 33200),
(33200, 33300),
(33300, 33400),
(33400, 33500),
(33500, 33600),
(33600, 33700),
(33700, 33800),
(33800, 33900),
(33900, 34000),
(34000, 34100),
(34100, 34200),
(34200, 34300),
(34300, 34400),
(34400, 34500),
(34500, 34600),
(34600, 34700),
(34700, 34800),
(34800, 34900),
(34900, 35000),
(35000, 35100),
(35100, 35200),
(35200, 35300),
(35300, 35400),
(35400, 35500),
(35500, 35600),
(35600, 35700),
(35700, 35800),
(35800, 35900),
(35900, 36000),
(36000, 36100),
(36100, 36200),
(36200, 36300),
(36300, 36400),
(36400, 36500),
(36500, 36600),
(36600, 36700),
(36700, 36800),
(36800, 36900),
(36900, 37000),
(37000, 37100),
(37100, 37200),
(37200, 37300),
(37300, 37400),
(37400, 37500),
(37500, 37600),
(37600, 37700),
(37700, 37800),
(37800, 37900),
(37900, 38000),
(38000, 38100),
(38100, 38200),
(38200, 38300),
(38300, 38400),
(38400, 38500),
(38500, 38600),
(38600, 38700),
(38700, 38800),
(38800, 38900),
(38900, 39000),
(39000, 39100),
(39100, 39200),
(39200, 39300),
(39300, 39400),
(39400, 39500),
(39500, 39600),
(39600, 39700),
(39700, 39800),
(39800, 39900),
(39900, 40000),
(40000, 40100),
(40100, 40200),
(40200, 40300),
(40300, 40400),
(40400, 40500),
(40500, 40600),
(40600, 40700),
(40700, 40800),
(40800, 40900),
(40900, 41000),
(41000, 41100),
(41100, 41200),
(41200, 41300),
(41300, 41400),
(41400, 41500),
(41500, 41600),
(41600, 41700),
(41700, 41800),
(41800, 41900),
(41900, 42000),
(42000, 42100),
(42100, 42200),
(42200, 42300),
(42300, 42400),
(42400, 42500),
(42500, 42600),
(42600, 42700),
(42700, 42800),
(42800, 42900),
(42900, 43000),
(43000, 43100),
(43100, 43200),
(43200, 43300),
(43300, 43400),
(43400, 43500),
(43500, 43600),
(43600, 43700),
(43700, 43800),
(43800, 43900),
(43900, 44000),
(44000, 44100),
(44100, 44200),
(44200, 44300),
(44300, 44400),
(44400, 44500),
(44500, 44600),
(44600, 44700),
(44700, 44800),
(44800, 44900),
(44900, 45000),
(45000, 45100),
(45100, 45200),
(45200, 45300),
(45300, 45400),
(45400, 45500),
(45500, 45600),
(45600, 45700),
(45700, 45800),
(45800, 45900),
(45900, 46000),
(46000, 46100),
(46100, 46200),
(46200, 46300),
(46300, 46400),
(46400, 46500),
(46500, 46600),
(46600, 46700),
(46700, 46800),
(46800, 46900),
(46900, 47000),
(47000, 47100),
(47100, 47200),
(47200, 47300),
(47300, 47400),
(47400, 47500),
(47500, 47600),
(47600, 47700),
(47700, 47800),
(47800, 47900),
(47900, 48000),
(48000, 48100),
(48100, 48200),
(48200, 48300),
(48300, 48400),
(48400, 48500),
(48500, 48600),
(48600, 48700),
(48700, 48800),
(48800, 48900),
(48900, 49000),
(49000, 49100),
(49100, 49200),
(49200, 49300),
(49300, 49400),
(49400, 49500),
(49500, 49600),
(49600, 49700),
(49700, 49800),
(49800, 49900),
(49900, 50000)],
'train_monitors_dict': {},
'train_monitors_outservice_dict': {},
'train_outservice': None,
'valid_batches': [(0, 100),
(100, 200),
(200, 300),
(300, 400),
(400, 500),
(500, 600),
(600, 700),
(700, 800),
(800, 900),
(900, 1000),
(1000, 1100),
(1100, 1200),
(1200, 1300),
(1300, 1400),
(1400, 1500),
(1500, 1600),
(1600, 1700),
(1700, 1800),
(1800, 1900),
(1900, 2000),
(2000, 2100),
(2100, 2200),
(2200, 2300),
(2300, 2400),
(2400, 2500),
(2500, 2600),
(2600, 2700),
(2700, 2800),
(2800, 2900),
(2900, 3000),
(3000, 3100),
(3100, 3200),
(3200, 3300),
(3300, 3400),
(3400, 3500),
(3500, 3600),
(3600, 3700),
(3700, 3800),
(3800, 3900),
(3900, 4000),
(4000, 4100),
(4100, 4200),
(4200, 4300),
(4300, 4400),
(4400, 4500),
(4500, 4600),
(4600, 4700),
(4700, 4800),
(4800, 4900),
(4900, 5000),
(5000, 5100),
(5100, 5200),
(5200, 5300),
(5300, 5400),
(5400, 5500),
(5500, 5600),
(5600, 5700),
(5700, 5800),
(5800, 5900),
(5900, 6000),
(6000, 6100),
(6100, 6200),
(6200, 6300),
(6300, 6400),
(6400, 6500),
(6500, 6600),
(6600, 6700),
(6700, 6800),
(6800, 6900),
(6900, 7000),
(7000, 7100),
(7100, 7200),
(7200, 7300),
(7300, 7400),
(7400, 7500),
(7500, 7600),
(7600, 7700),
(7700, 7800),
(7800, 7900),
(7900, 8000),
(8000, 8100),
(8100, 8200),
(8200, 8300),
(8300, 8400),
(8400, 8500),
(8500, 8600),
(8600, 8700),
(8700, 8800),
(8800, 8900),
(8900, 9000),
(9000, 9100),
(9100, 9200),
(9200, 9300),
(9300, 9400),
(9400, 9500),
(9500, 9600),
(9600, 9700),
(9700, 9800),
(9800, 9900),
(9900, 10000)],
'valid_flag': False,
'valid_monitor_function': None,
'valid_monitors_dict': {},
'valid_monitors_outservice_dict': {}}
In [23]:
# test the trained model and save some reconstruction images
n_examples = 100
# grab 100 test examples
test_xs, _ = mnist.getSubset(datasets.TEST)
test_xs = test_xs[:100].eval()
In [26]:
print test_xs[0].shape
(784,)
In [22]:
# test and save the images
dae.create_reconstruction_image(test_xs)
Content source: dikien/personnel-study
Similar notebooks: