annotate deep/stacked_dae/v_youssouf/config.py @ 573:07b727a12632

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