comparison deep/stacked_dae/v_youssouf/config.py @ 377:0b7e64e8e93f

branch merge
author Arnaud Bergeron <abergeron@gmail.com>
date Sun, 25 Apr 2010 17:12:03 -0400
parents 8cf52a1c8055
children
comparison
equal deleted inserted replaced
376:01445a75c702 377:0b7e64e8e93f
1 '''
2 These are parameters used by nist_sda_retrieve.py. They'll end up as globals in there.
3
4 Rename this file to config.py and configure as needed.
5 DON'T add the renamed file to the repository, as others might use it
6 without realizing it, with dire consequences.
7 '''
8
9 # Set this to True when you want to run cluster tests, ie. you want
10 # to run on the cluster, many jobs, but want to reduce the training
11 # set size and the number of epochs, so you know everything runs
12 # fine on the cluster.
13 # Set this PRIOR to inserting your test jobs in the DB.
14 TEST_CONFIG = False
15
16 NIST_ALL_LOCATION = '/data/lisa/data/nist/by_class/all'
17 NIST_ALL_TRAIN_SIZE = 649081
18 # valid et test =82587 82587
19
20 #Path of two pre-train done earlier
21 PATH_NIST = '/u/pannetis/IFT6266/ift6266/deep/stacked_dae/v_sylvain/NIST_big'
22 PATH_P07 = '/u/pannetis/IFT6266/ift6266/deep/stacked_dae/v_sylvain/P07_big/'
23
24 '''
25 # change "sandbox" when you're ready
26 JOBDB = 'postgres://ift6266h10@gershwin/ift6266h10_db/pannetis_SDA_retrieve'
27 EXPERIMENT_PATH = "ift6266.deep.stacked_dae.v_sylvain.nist_sda_retrieve.jobman_entrypoint"
28 '''
29
30 ##Pour lancer des travaux sur le cluster: (il faut etre ou se trouve les fichiers)
31 ##python nist_sda_retrieve.py jobman_insert
32 ##dbidispatch --condor --repeat_jobs=2 jobman sql 'postgres://ift6266h10@gershwin/ift6266h10_db/pannetis_finetuningSDA0' . #C'est le path dans config.py
33
34 ##Pour lancer sur GPU sur boltzmann (changer device=gpuX pour X le bon assigne)
35 ##THEANO_FLAGS=floatX=float32,device=gpu2 python nist_sda_retrieve.py test_jobman_entrypoint
36
37
38 # reduce training set to that many examples
39 REDUCE_TRAIN_TO = None
40 # that's a max, it usually doesn't get to that point
41 MAX_FINETUNING_EPOCHS = 1000
42 # number of minibatches before taking means for valid error etc.
43 REDUCE_EVERY = 100
44 #Set the finetune dataset
45 FINETUNE_SET=0
46 #Set the pretrain dataset used. 0: NIST, 1:P07
47 PRETRAIN_CHOICE=0
48
49
50 if TEST_CONFIG:
51 REDUCE_TRAIN_TO = 1000
52 MAX_FINETUNING_EPOCHS = 2
53 REDUCE_EVERY = 10
54
55 # select detection or classification
56 DETECTION_MODE = 0
57 # consider maj and minuscule as the same
58 REDUCE_LABEL = 1
59
60
61 # This is to configure insertion of jobs on the cluster.
62 # Possible values the hyperparameters can take. These are then
63 # combined with produit_cartesien_jobs so we get a list of all
64 # possible combinations, each one resulting in a job inserted
65 # in the jobman DB.
66 JOB_VALS = {'pretraining_lr': [0.1],#, 0.001],#, 0.0001],
67 'pretraining_epochs_per_layer': [10],
68 'hidden_layers_sizes': [800],
69 'corruption_levels': [0.2],
70 'minibatch_size': [100],
71 'max_finetuning_epochs':[MAX_FINETUNING_EPOCHS],
72 'max_finetuning_epochs_P07':[1],
73 'finetuning_lr':[0.01], #0.001 was very bad, so we leave it out
74 'num_hidden_layers':[4],
75 'finetune_set':[-1],
76 'pretrain_choice':[0,1]
77 }
78
79 # Just useful for tests... minimal number of epochs
80 # (This is used when running a single job, locally, when
81 # calling ./nist_sda.py test_jobman_entrypoint
82 DEFAULT_HP_NIST = {'finetuning_lr':0.05,
83 'pretraining_lr':0.01,
84 'pretraining_epochs_per_layer':15,
85 'max_finetuning_epochs':MAX_FINETUNING_EPOCHS,
86 #'max_finetuning_epochs':1,
87 'max_finetuning_epochs_P07':7,
88 'hidden_layers_sizes':1500,
89 'corruption_levels':0.2,
90 'minibatch_size':100,
91 #'reduce_train_to':2000,
92 'decrease_lr':1,
93 'num_hidden_layers':4,
94 'finetune_set':2,
95 'pretrain_choice':1,
96 'detection_mode':DETECTION_MODE,
97 'reduce_label':REDUCE_LABEL}
98