-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig.py
61 lines (61 loc) · 1.99 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
from jobman import DD
import utils
exp_path = '/data/lisatmp3/yaoli/exp/nade_k_nips14_release/'
#exp_path = './exps/'
best_1h_model = exp_path + 'reproduce_h500_k5_oldcode_pretrain_finetune/'
best_2h_model = exp_path + 'reproduce_h500_h500_k5_oldcode_pretrain_finetune/'
config = DD({
'model': 'DeepOrderlessNADE',
'load_trained': DD({
# action: 0 standard train, 1 load trained model and evaluate, 2 continue training
'action': 0,
'from_path': best_2h_model,
'epoch': 3999,
}),
'random_seed': 1234,
'save_model_path': exp_path + '/nade_k_nips14_release_final/test_h2/',
'dataset': DD({
'signature': 'MNIST_binary_russ',
}),
'DeepOrderlessNADE': DD({
'n_in': None,
'n_out': None,
'n_hidden': 500,
'n_layers': 2,
'hidden_act': 'tanh',
'tied_weights': False,
# only for the first step of mean field
'use_mask': False,
# use data mean to intialize the mean field
'init_mean_field': True,
# not avg cost over k steps but only take the cost from the last step
'cost_from_last': False,
# 1:0.01 gaussian,2: formula
'init_weights': 1,
# centering v
'center_v': False,
'train': DD({
# valid once every 'valid_freq' epochs
'valid_freq': 250,
# compute valid and test LL over this many of orderings
'n_orderings': 5,
'n_epochs': 1000,
'minibatch_size': 100,
# 0 for momentum, 1 for adadelta
'sgd_type': 1,
'momentum': 0.9,
'lr': 0.001,
# 0.0012279827881 for 2h model
# 0.0 for 1h model
'l2': 0.0012279827881,
# number of mean field steps
'k': 5,
'verbose': True,
'fine_tune': DD({
'activate': True,
'n_epochs': 3000,
})
})
})
})