Mercurial > ift6266
comparison deep/stacked_dae/nist_sda.py @ 204:e1f5f66dd7dd
Changé le coût de reconstruction pour stabilité numérique, en ajoutant une petite constante dans le log.
author | fsavard |
---|---|
date | Thu, 04 Mar 2010 08:18:42 -0500 |
parents | e656edaedb48 |
children | 10a801240bfc |
comparison
equal
deleted
inserted
replaced
192:e656edaedb48 | 204:e1f5f66dd7dd |
---|---|
25 | 25 |
26 from sgd_optimization import SdaSgdOptimizer | 26 from sgd_optimization import SdaSgdOptimizer |
27 | 27 |
28 from ift6266.utils.scalar_series import * | 28 from ift6266.utils.scalar_series import * |
29 | 29 |
30 ############################################################################## | |
31 # GLOBALS | |
32 | |
30 TEST_CONFIG = False | 33 TEST_CONFIG = False |
31 | 34 |
32 NIST_ALL_LOCATION = '/data/lisa/data/nist/by_class/all' | 35 NIST_ALL_LOCATION = '/data/lisa/data/nist/by_class/all' |
33 | |
34 JOBDB = 'postgres://ift6266h10@gershwin/ift6266h10_db/fsavard_sda4' | 36 JOBDB = 'postgres://ift6266h10@gershwin/ift6266h10_db/fsavard_sda4' |
37 EXPERIMENT_PATH = "ift6266.deep.stacked_dae.nist_sda.jobman_entrypoint" | |
35 | 38 |
36 REDUCE_TRAIN_TO = None | 39 REDUCE_TRAIN_TO = None |
37 MAX_FINETUNING_EPOCHS = 1000 | 40 MAX_FINETUNING_EPOCHS = 1000 |
38 REDUCE_EVERY = 1000 # number of minibatches before taking means for valid error etc. | 41 # number of minibatches before taking means for valid error etc. |
42 REDUCE_EVERY = 1000 | |
43 | |
39 if TEST_CONFIG: | 44 if TEST_CONFIG: |
40 REDUCE_TRAIN_TO = 1000 | 45 REDUCE_TRAIN_TO = 1000 |
41 MAX_FINETUNING_EPOCHS = 2 | 46 MAX_FINETUNING_EPOCHS = 2 |
42 REDUCE_EVERY = 10 | 47 REDUCE_EVERY = 10 |
43 | |
44 EXPERIMENT_PATH = "ift6266.deep.stacked_dae.nist_sda.jobman_entrypoint" | |
45 | 48 |
46 # Possible values the hyperparameters can take. These are then | 49 # Possible values the hyperparameters can take. These are then |
47 # combined with produit_cartesien_jobs so we get a list of all | 50 # combined with produit_cartesien_jobs so we get a list of all |
48 # possible combinations, each one resulting in a job inserted | 51 # possible combinations, each one resulting in a job inserted |
49 # in the jobman DB. | 52 # in the jobman DB. |
65 'corruption_levels':0.2, | 68 'corruption_levels':0.2, |
66 'minibatch_size':20, | 69 'minibatch_size':20, |
67 #'reduce_train_to':300, | 70 #'reduce_train_to':300, |
68 'num_hidden_layers':2}) | 71 'num_hidden_layers':2}) |
69 | 72 |
70 # Function called by jobman upon launching each job | 73 ''' |
71 # Its path is the one given when inserting jobs: | 74 Function called by jobman upon launching each job |
72 # ift6266.deep.stacked_dae.nist_sda.jobman_entrypoint | 75 Its path is the one given when inserting jobs: |
76 ift6266.deep.stacked_dae.nist_sda.jobman_entrypoint | |
77 ''' | |
73 def jobman_entrypoint(state, channel): | 78 def jobman_entrypoint(state, channel): |
74 # record mercurial versions of each package | 79 # record mercurial versions of each package |
75 pylearn.version.record_versions(state,[theano,ift6266,pylearn]) | 80 pylearn.version.record_versions(state,[theano,ift6266,pylearn]) |
76 channel.save() | 81 channel.save() |
77 | 82 |
245 | 250 |
246 elif len(args) > 0 and args[0] == 'jobman_insert': | 251 elif len(args) > 0 and args[0] == 'jobman_insert': |
247 jobman_insert_nist() | 252 jobman_insert_nist() |
248 | 253 |
249 elif len(args) > 0 and args[0] == 'test_jobman_entrypoint': | 254 elif len(args) > 0 and args[0] == 'test_jobman_entrypoint': |
250 def f(): | 255 chanmock = DD({'COMPLETE':0,'save':(lambda:None)}) |
251 pass | |
252 chanmock = DD({'COMPLETE':0,'save':f}) | |
253 jobman_entrypoint(DEFAULT_HP_NIST, chanmock) | 256 jobman_entrypoint(DEFAULT_HP_NIST, chanmock) |
254 | 257 |
255 elif len(args) > 0 and args[0] == 'estimate': | 258 elif len(args) > 0 and args[0] == 'estimate': |
256 estimate_total_time() | 259 estimate_total_time() |
260 | |
257 else: | 261 else: |
258 print "Bad arguments" | 262 print "Bad arguments" |
263 |