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